Horizontal partitioning of database to scale the ROR application

I want to do horizontal partitioning of database to scale my application. Is there any way to do that Ruby on Rails application.

Masochism can solve your problem definitely(An easy solution for Ruby on Rails applications to work in a replicated database environment)

http://github.com/technoweenie/masochism

That is good plugin but instead of based on the ActiveRecord method call I want to do it on the query type. If the query is insert/update/delete then query will execute on master database otherwise all the select query will execute on slave.

Ankit Varshney wrote:

I want to do horizontal partitioning of database to scale my application. Is there any way to do that Ruby on Rails application.

Why not let the DB server do this? Most good DB servers have intelligent ways of splitting the DB and still letting it appear as one DB to the app. Check the docs for your server.

Best,