Forum: Ruby on Rails Rails with PostgreSQL or MySQL?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Matt White (Guest)
on 2007-07-02 23:00
(Received via mailing list)
Hello,

My company is currently using Rails with PostgreSQL. We have lots of
performance issues and some of the developers/admins think that
switching to MySQL will solve at least some of the problems since so
many Rails enthusiasts use MySQL. From my own research on the issue, I
have not seen that MySQL is consistently better than PostgreSQL at
anything really. I have noticed that PostgreSQL seems to outperform
MySQL significantly given multiple cores. Can anyone share with me an
educated opinion on the matter or point me to some resources where I
can find more information? Thanks!
Philip Hallstrom (Guest)
on 2007-07-02 23:16
(Received via mailing list)
> My company is currently using Rails with PostgreSQL. We have lots of
> performance issues and some of the developers/admins think that

That's fairly broad... can you elaborate?  It could be a variety of
things... postgresql is misconfigured... rails is misconfigured...
you're
asking for things the wrong way, etc. etc.

If there's a problematic query, what happens if you run that directly in
postgresql? does the problem go away?

if not, a post to the postgresql mailing list with details on your
configuration might help.

Without anything else to go on I wouldn't advise switching to MySQL
until
you know it's a postgresql problem that can't be solved (in a reasonable
time frame, etc...)

-philip
snacktime (Guest)
on 2007-07-02 23:50
(Received via mailing list)
On 7/2/07, Matt White <whiteqt@gmail.com> wrote:
>
> Hello,
>
> My company is currently using Rails with PostgreSQL. We have lots of
> performance issues and some of the developers/admins think that
> switching to MySQL will solve at least some of the problems since so
> many Rails enthusiasts use MySQL.
 From my own research on the issue, I
> have not seen that MySQL is consistently better than PostgreSQL at
> anything really. I have noticed that PostgreSQL seems to outperform
> MySQL significantly given multiple cores. Can anyone share with me an
> educated opinion on the matter or point me to some resources where I
> can find more information? Thanks!
>

I agree with what Philip said, define the problem first.  In my
experience postgresql holds up better under load, and much better with
complicated queries that contain lots of subselects, aggregates, etc..
 But postgresql has to be tuned.  It gives you a superior query
planner and better/more reliable statistics for tuning, but you have
to do it.

The postgresql lists are great, you should really ask your question
there, but be prepared to give a lot more information such as an
explain analyze for the queries that are slow, etc..

Chris
David Mitchell (Guest)
on 2007-07-03 03:19
(Received via mailing list)
As Chris said, out-of-the-box configs of Postgres are pretty terrible
- they seem to be designed to run on the absolute minimal hardware
config.

Check the Postgres mailing lists, or dig into the site for performance
info.  I've had no trouble getting big multiples of performance
increase out of Postgres on several different occasions by changing a
few parameters.

Regards

Dave M.
This topic is locked and can not be replied to.