Ruby on Rails的活跃记录生成的SQL上的Postgres

编程入门 行业动态 更新时间:2024-10-24 08:24:32
本文介绍了Ruby on Rails的活跃记录生成的SQL上的Postgres的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

为什么轨道上的Ruby产生在Postgres的背景比MySQL更多的疑问?我没有尝试过生产与Postgres的部署Rails的呢,但我只是怕这个生成的查询会影响性能。你有没有发现钢轨的Postgres比MySQL的慢,因为知道它产生更多的查询上的背景是什么?或者是比较相同的?

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?

推荐答案

我不认为Postgres将影响你的表现,尽管它使用更多的资源,因为它的一个完整的RDBM实施,从长远来看,Postgres将是最好的选择,如果你正在寻找的性能。

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.

SQL查询的数量是相对的,你必须记住,带来同样的结果(MySQL和Postgres有自己的实现)只是举一个例子MYSQL不实现完整的PS / SQL。

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..

所以在底线:查询的数量是无关的,Postgres将帮助你在晚上睡得更好: - )

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

关于这个主题很好的参考: www.amazon/Enterprise-Rails-丹泽/ DP / 0596515200

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

更多推荐

Ruby on Rails的活跃记录生成的SQL上的Postgres

本文发布于:2023-10-27 16:02:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1533863.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:活跃   Rails   Ruby   SQL   Postgres

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!