From: Scott Lamb <slamb@slamb.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 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 12:20:11 -0700
Message-ID: <451A4BAB-97D2-4292-9CF9-CB6DB5B3BCD4@slamb.org> (raw)
In-Reply-To: <18261.1155839607@sss.pgh.pa.us>
References: <44E35A5D.19933.35F376@peter.ssbg.zetnet.co.uk>
<44E4430D.15373.6A0C60@peter.ssbg.zetnet.co.uk>
<5321.1155820310@sss.pgh.pa.us>
<18261.1155839607@sss.pgh.pa.us>
I have no idea if there's a standard name or what it may be, but for
what it's worth, this sounds similar to the optimizations I wanted
for a different query:
http://archives.postgresql.org/pgsql-performance/2005-11/msg00037.php
1. Recognize that a term constant across the whole sort is
irrelevant. (In my earlier case, a constant number, but here MAX
(xxx), which seems harder.)
2. Put together two sequences already in the appropriate order,
without resorting. (In my case, a union; here a join.)
though I no longer need them for that problem. I'm quite happy with
the client-side solution we came up with.
--
Scott Lamb <http://www.slamb.org/;
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: slamb@slamb.org, 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: <451A4BAB-97D2-4292-9CF9-CB6DB5B3BCD4@slamb.org>
* 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