X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 700289FA4A8 for ; Fri, 21 Jul 2006 09:16:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 50918-07 for ; Fri, 21 Jul 2006 09:15:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by postgresql.org (Postfix) with SMTP id 361899FA60C for ; Fri, 21 Jul 2006 08:45:45 -0300 (ADT) Received: (qmail invoked by alias); 21 Jul 2006 11:45:43 -0000 Received: from dslb-084-063-100-008.pools.arcor-ip.net (EHLO colt.pezone.net) [84.63.100.8] by mail.gmx.net (mp023) with SMTP; 21 Jul 2006 13:45:43 +0200 X-Authenticated: #495269 From: Peter Eisentraut To: pgsql-performance@postgresql.org Subject: Re: Forcing using index instead of sequential scan? Date: Fri, 21 Jul 2006 13:45:41 +0200 User-Agent: KMail/1.9.1 Cc: robin.c.smith@bt.com References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607211345.41573.peter_e@gmx.net> X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.134 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, SPF_PASS X-Spam-Level: X-Archive-Number: 200607/205 X-Sequence-Number: 20065 robin.c.smith@bt.com wrote: > What is the best way to force the use of indexes in these queries? Well, the brute-force method is to use SET enable_seqscan TO off, but if you want to get to the bottom of this, you should look at or post the EXPLAIN ANALYZE output of the offending queries. -- Peter Eisentraut http://developer.postgresql.org/~petere/