views:

118

answers:

1

Dear all,

Why does Ruby on rails generated more queries in the background on Postgres than MySQL? I haven't tried deploying Rails on production with Postgres yet, but I am just afraid this generated queries would affect the performance. Do you find Rails with Postgres is slower than MySQL, knowing that it produce more query on the background? Or it is relatively the same?

A: 

hi,

i don't think that Postgres will affect your performance, despite it uses more resource, since its a full RDBM implementation, in the long term, postgres will be the best option if you are looking for performance.

Number of SQL queries is relative, you must remember that to bring same results (MySQL and PostGRES has their own implementations) Just to give an example MYSQL dont implement the full PS/SQL..

so in the bottom line: the number of "queries" are irrelevant and postgres will help you to sleep better at night :-)

good reference about this subject: http://www.amazon.com/Enterprise-Rails-Dan-Chak/dp/0596515200

VP