Re: Need help to decide Mysql vs Postgres

From: Alvaro Herrera <alvherre(at)surnet(dot)cl>
To: Amit V Shah <ashah(at)tagaudit(dot)com>
Cc: 'Jeffrey Tenny' <jeffrey(dot)tenny(at)comcast(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Need help to decide Mysql vs Postgres
Date: 2005-06-06 16:15:37
Message-ID: 20050606161537.GB9595@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jun 06, 2005 at 12:00:08PM -0400, Amit V Shah wrote:

> I made a schema with 5 tables. I have a master data table with foreign keys
> pointing to other 4 tables. Master data table has around 4 million records.
> When I run a select joining it with the baby tables,
>
> postgres -> returns results in 2.8 seconds
> mysql -> takes around 16 seconds !!!! (This is with myisam ... with innodb
> it takes 220 seconds)

PostgreSQL has an excellent query optimizer, so if you get a much better
execution time than MySQL in complex queries this isn't at all unexpected.

I assume the MySQL guys would tell you to rewrite the queries in certain
ways to make it go faster (just like the Postgres guys tell people to
rewrite certain things when they hit Postgres limitations.)

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"I would rather have GNU than GNOT." (ccchips, lwn.net/Articles/37595/)

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Rod Taylor 2005-06-06 16:22:29 Re: Need help to decide Mysql vs Postgres
Previous Message Casey Allen Shobe 2005-06-06 16:04:39 Re: Performance nightmare with dspam (urgent) (resolved)