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 E5CA3D1B51F for ; Mon, 29 Sep 2003 04:53:00 +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 92474-08 for ; Mon, 29 Sep 2003 01:52:29 -0300 (ADT) Received: from smtp.noos.fr (nan-smtp-08.noos.net [212.198.2.77]) by svr1.postgresql.org (Postfix) with ESMTP id C75B5D1B510 for ; Mon, 29 Sep 2003 01:52:28 -0300 (ADT) Received: (qmail 58436535 invoked by uid 0); 28 Sep 2003 22:54:52 -0000 Received: from unknown (HELO bigfoot.com) ([212.198.37.110]) (envelope-sender ) by 212.198.2.77 (qmail-ldap-1.03) with SMTP for ; 28 Sep 2003 22:54:52 -0000 Message-ID: <3F7766B3.4030705@bigfoot.com> Date: Mon, 29 Sep 2003 00:54:43 +0200 From: Gaetano Mendola User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "pgsql-performance@postgresql.org" Cc: Palle Girgensohn Subject: Re: avoiding seqscan? References: <95900000.1064782481@palle.girgensohn.se> In-Reply-To: <95900000.1064782481@palle.girgensohn.se> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/362 X-Sequence-Number: 3728 Palle Girgensohn wrote: > uu=# 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 = > gd.this_group_id) > uu-# join person p on (gd.item_text = p.userid) > uu-# join dyn_field_person dfp on (dfp.extern_item_id = 10 and > dfp.giver=c.giver) > uu-# join dyn_field_content_person dfcp on (dfp.id = > dfcp.dyn_field_id and dfcp.userid=p.userid) > uu-# left outer join participant pt on (pt.userid = p.userid and > pt.course_id = 707) > uu-# WHERE c.id = 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