pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@surnet.cl>
To: Amit V Shah <ashah@tagaudit.com>
Cc: Jeffrey Tenny <jeffrey.tenny@comcast.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Need help to decide Mysql vs Postgres
Date: Mon, 6 Jun 2005 12:15:37 -0400
Message-ID: <20050606161537.GB9595@surnet.cl> (raw)
In-Reply-To: <0C072E7CC947D511AC9600A0CC7341200256CF36@xeon400.tagaudit.com>
References: <0C072E7CC947D511AC9600A0CC7341200256CF36@xeon400.tagaudit.com>

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/)



view thread (33+ messages)  latest in thread

Message-ID: <20050606161537.GB9595@surnet.cl>
Permalink:  ../20050606161537.GB9595@surnet.cl/
Also on:    postgresql.org/message-id/20050606161537.GB9595@surnet.cl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: alvherre@surnet.cl, ashah@tagaudit.com, jeffrey.tenny@comcast.net
  Subject: Re: Need help to decide Mysql vs Postgres
  In-Reply-To: <20050606161537.GB9595@surnet.cl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox