X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id EAD8BD1B53B for ; Mon, 29 Sep 2003 13:26:14 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 86270-06 for ; Mon, 29 Sep 2003 10:25:47 -0300 (ADT) Received: from durian.pingpong.net (81.milagro.bahnhof.net [195.178.168.81]) by svr1.postgresql.org (Postfix) with ESMTP id 9070BD1B51F for ; Mon, 29 Sep 2003 10:25:42 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by durian.pingpong.net (8.12.8p1/8.12.8) with ESMTP id h8TDPaOj001247; Mon, 29 Sep 2003 15:25:36 +0200 (CEST) (envelope-from girgen@pingpong.net) Date: Mon, 29 Sep 2003 15:25:36 +0200 From: Palle Girgensohn To: Gaetano Mendola , "pgsql-performance@postgresql.org" Subject: Re: avoiding seqscan? Message-ID: <180710000.1064841936@durian.pingpong.net> In-Reply-To: <3F7766B3.4030705@bigfoot.com> References: <95900000.1064782481@palle.girgensohn.se> <3F7766B3.4030705@bigfoot.com> X-Mailer: Mulberry/3.0.3 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/351 X-Sequence-Number: 3717 Will that make a difference? From what I've seen, it does not make much=20 difference, but I have seen queries speed up when rewritten explicit joins.= =20 I guess it depends on other things, but is it really so that the explicit= =20 joins are bad somehow? Do you have any pointers to documentation about it,= =20 if so? Thanks, Palle --On m=E5ndag, september 29, 2003 00.54.43 +0200 Gaetano Mendola=20 wrote: > Palle Girgensohn wrote: >> uu=3D# explain analyze >> uu-# select lower(substr(p.last_name,1,1)) as letter, count(*) >> uu-# FROM course c join group_data gd on (c.active_group_id =3D >> gd.this_group_id) >> uu-# join person p on (gd.item_text =3D p.userid) >> uu-# join dyn_field_person dfp on (dfp.extern_item_id =3D 10 and >> dfp.giver=3Dc.giver) >> uu-# join dyn_field_content_person dfcp on (dfp.id =3D >> dfcp.dyn_field_id and dfcp.userid=3Dp.userid) >> uu-# left outer join participant pt on (pt.userid =3D p.userid and >> pt.course_id =3D 707) >> uu-# WHERE c.id =3D 707 >> uu-# group by 1 >> uu-# ; > > Why are you using this form of join ? When and if is not necessary use > the implicit form. > > > Regards > Gaetano Mendola > > >