On Friday 21 October 2005 14:34, Mario Splivalo wrote:
| On Fri, 2005-10-21 at 14:01 +0200, Havasvölgyi Ottó wrote:
| > Mike,
| >
| > Please send the EXPLAIN ANALYZE of the two versions of the query. ^^^^^^^^^^^^^^^
| There they are, they are both the same:
|
| join_test=# select version();
| version
| ---------------------------------------------------------------------------
|------------------------------------------- PostgreSQL 7.4.9 on
| i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.2 20050808 (prerelease)
| (Ubuntu 4.0.1-4ubuntu9)
| (1 row)
|
| join_test=# \timing
| Timing is on.
| join_test=# set enable_seqscan to off;
| SET
| Time: 0.715 ms
| join_test=# explain select p.phone, count(*) from phones p left join
| table_data d on p.phone = d.phone group by p.phone having count(*) > 1
| order by count(*) desc;
this is not what Otto requested; please send the output of
EXPLAIN ANALYZE select p.phone, count(*) from phones p left join table_data d on p.phone = d.phone group by p.phone
havingcount(*) > 1 order by count(*) desc;
for both versions.
Ciao,
Thomas
--
Thomas Pundt <thomas.pundt@rp-online.de> ---- http://rp-online.de/ ----