From: Stephen R. van den Berg <srb@cuci.nl>
To: Decibel! <decibel@decibel.org>
Cc: Richard Huxton <dev@archonet.com>
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Cc: Luke Lonergan <LLonergan@greenplum.com>
Cc: albert@sedifa.com
Subject: Re: [PERFORM] Posible planner improvement?
Date: Sun, 25 May 2008 10:21:33 +0200
Message-ID: <20080525082133.GB27965@cuci.nl> (raw)
In-Reply-To: <1870DB98-E4E2-4DB5-8620-DB4A8309A73C@decibel.org>
References: <014F2941B0A1EA47BD61D21526B806E90162C3D2@MI8NYCMAIL08.Mi8.com>
<48341F1D.3090304@archonet.com>
<1870DB98-E4E2-4DB5-8620-DB4A8309A73C@decibel.org>
Decibel! wrote:
>For reference, the original query as posted to -performance:
>select * from t1, t2 where t1.id > 158507 and t1.id = t2.id;
>That took > 84 minutes (the query was a bit longer but this is the
>part that made the difference) after a little change the query took
>~1 second:
Just out of curiosity, would predefining the order of join have solved
the issue, as in:
a. select * from t1 join t2 using(id) where t1.id > 158507;
vs.
b. select * from t2 join t1 using(id) where t1.id > 158507;
I'd expect a to be faster than b, is it?
--
Sincerely, srb@cuci.nl
Stephen R. van den Berg.
"Technology is stuff that doesn't work yet." -- Bran Ferren
"We no longer think of chairs as technology." -- Douglas Adams
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: srb@cuci.nl, decibel@decibel.org, dev@archonet.com, pgsql-hackers@postgresql.org, LLonergan@greenplum.com, albert@sedifa.com
Subject: Re: [PERFORM] Posible planner improvement?
In-Reply-To: <20080525082133.GB27965@cuci.nl>
* 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