简体   繁体   中英

Ruby on rails active-record generated SQL on Postgres

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM