X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A9451567D3 for ; Mon, 21 Mar 2005 09:15:53 +0000 (GMT) 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 12675-07 for ; Mon, 21 Mar 2005 09:15:45 +0000 (GMT) Received: from anchor-post-33.mail.demon.net (anchor-post-33.mail.demon.net [194.217.242.91]) by svr1.postgresql.org (Postfix) with ESMTP id 11D94563FE for ; Mon, 21 Mar 2005 09:15:44 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-33.mail.demon.net with esmtp (Exim 4.42) id 1DDJ0j-000FIj-Bn; Mon, 21 Mar 2005 09:15:45 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 7A66916990; Mon, 21 Mar 2005 09:15:41 +0000 (GMT) Message-ID: <423E90BC.80501@archonet.com> Date: Mon, 21 Mar 2005 09:15:40 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mihail Nasedkin Cc: pgsql-sql@postgresql.org Subject: Re: index scan References: <10520036015.20050321132621@mail.ru> In-Reply-To: <10520036015.20050321132621@mail.ru> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.061 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/278 X-Sequence-Number: 20757 Mihail Nasedkin wrote: > xxxx=# explain select * from sites s join site_screens ss on s.oid = ss.id_site; QUERY PLAN --------------------------------------------------------------------------- > Hash Join (cost=...) > Hash Cond: ("outer".id_site = "inner".oid) > -> Seq Scan on site_screens ss (cost=...) > -> Hash (cost=...) > -> Seq Scan on sites s (cost=...) You've commented out the interesting bits (the costs/rows) > I want to Index Scan. What must I do? Why do you want an index scan? Do you have any evidence it will be faster than a sequential scan? -- Richard Huxton Archonet Ltd