X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B0FB9DA416 for ; Fri, 21 Oct 2005 09:51:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07989-07 for ; Fri, 21 Oct 2005 12:51:25 +0000 (GMT) Received: from mail.rp-online.de (mail.rp-online.de [149.221.1.199]) by svr1.postgresql.org (Postfix) with ESMTP id E049CDA40E for ; Fri, 21 Oct 2005 09:51:27 -0300 (ADT) Received: from mail1 (localhost [127.0.0.1]) by localhost.rp-online.de (Postfix) with SMTP id 0D1C0AF4D; Fri, 21 Oct 2005 14:51:31 +0200 (CEST) Received: from idefix.d.rp-online.de (idefix.d.rp-online.de [149.221.100.194]) by mail.rp-online.de (Postfix) with ESMTP id CA497405F; Fri, 21 Oct 2005 14:51:30 +0200 (CEST) From: Thomas Pundt Reply-To: Thomas Pundt Organization: RP Online Verlagsgesellschaft mbH To: pgsql-sql@postgresql.org, mario.splivalo@mobart.hr Subject: Re: Postgres 7.4.9 slow! Date: Fri, 21 Oct 2005 14:52:59 +0200 User-Agent: KMail/1.8.3 Cc: =?utf-8?q?Havasv=C3=B6lgyi_Ott=C3=B3?= References: <1129893226.25351.3.camel@ekim> <006701c5d637$2d7b5550$6400a8c0@OTTO> <1129898066.27326.6.camel@ekim> In-Reply-To: <1129898066.27326.6.camel@ekim> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200510211452.59642.mlists@rp-online.de> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200510/241 X-Sequence-Number: 23094 On Friday 21 October 2005 14:34, Mario Splivalo wrote: | On Fri, 2005-10-21 at 14:01 +0200, Havasv=C3=B6lgyi Ott=C3=B3 wrote: | > Mike, | > | > Please send the EXPLAIN ANALYZE of the two versions of the query. ^^^^^^^^^^^^^^^ | There they are, they are both the same: | | join_test=3D# select version(); | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0version | -------------------------------------------------------------------------= =2D- |------------------------------------------- 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=3D# \timing | Timing is on. | join_test=3D# set enable_seqscan to off; | SET | Time: 0.715 ms | join_test=3D# explain select p.phone, count(*) from phones p left join | table_data d on p.phone =3D d.phone group by p.phone having count(*) > 1 | order by count(*) desc; this is not what Otto requested; please send the output of=20 EXPLAIN ANALYZE select p.phone, count(*) from phones p left join table_data d on p.phone =3D d.phone group by p.phone having count(*) > 1 order by count(*) desc; for both versions. Ciao, Thomas =2D-=20 Thomas Pundt ---- http://rp-online.de/ ----