From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Hardman <peter@ssbg.zetnet.co.uk>
Cc: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL runs a query much slower than BDE and MySQL
Date: Thu, 17 Aug 2006 09:11:50 -0400
Message-ID: <5321.1155820310@sss.pgh.pa.us> (raw)
In-Reply-To: <44E4430D.15373.6A0C60@peter.ssbg.zetnet.co.uk>
References: <44E35A5D.19933.35F376@peter.ssbg.zetnet.co.uk>
<44E4430D.15373.6A0C60@peter.ssbg.zetnet.co.uk>
"Peter Hardman" <peter@ssbg.zetnet.co.uk> writes:
> I wonder whether Paradox and MySQL are just not doing the sort (this
> seems to be what eats up the time), since the output of the subquery
> is in fact already in the proper order.
MSSQL (from the other thread). I feel fairly safe in assuming that
MySQL's query optimizer is not nearly in the league to do this query
effectively. (I like the theory Arjen mentioned that what you are
measuring there is the effects of their query cache rather than a
smart fundamental implementation.) I wonder whether MSSQL has an
EXPLAIN equivalent ...
Anywy, your point about the sort being redundant is a good one, and
offhand I'd have expected PG to catch that; I'll have to look into
why it didn't. But that's not going to explain a 10x speed
difference, because the sort isn't 90% of the runtime.
regards, tom lane
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: tgl@sss.pgh.pa.us, peter@ssbg.zetnet.co.uk
Subject: Re: PostgreSQL runs a query much slower than BDE and MySQL
In-Reply-To: <5321.1155820310@sss.pgh.pa.us>
* 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