X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id ACF4FCB6EF for ; Sat, 12 Jul 2003 03:53:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 19059-08 for ; Sat, 12 Jul 2003 03:53:28 +0000 (GMT) Received: from mail-3.zoominternet.net (unknown [63.67.120.25]) by svr1.postgresql.org (Postfix) with SMTP id CD5F5D5331 for ; Fri, 11 Jul 2003 15:22:46 -0300 (ADT) Received: (qmail 6679 invoked from network); 11 Jul 2003 18:23:04 -0000 Received: from acs-24-154-209-142.zoominternet.net (HELO gmod.lajolla) ([24.154.209.142]) (envelope-sender ) by mail-3.zoominternet.net (qmail-ldap-1.03) with SMTP for ; 11 Jul 2003 18:23:04 -0000 Subject: Re: force the use of a particular index From: Scott Cain To: Rod Taylor Cc: Postgresql Performance In-Reply-To: <1057947284.65544.129.camel@jester> References: <1057850280.1451.22.camel@localhost.localdomain> <1057920672.46100.149.camel@jester> <1057929459.5766.7.camel@localhost.localdomain> <1057930695.46100.172.camel@jester> <1057937779.5767.17.camel@localhost.localdomain> <1057940450.65544.14.camel@jester> <1057944059.5766.34.camel@localhost.localdomain> <1057947284.65544.129.camel@jester> Content-Type: text/plain Organization: Cold Spring Harbor Lab Message-Id: <1057947784.5767.39.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 11 Jul 2003 14:23:04 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/186 X-Sequence-Number: 2479 On Fri, 2003-07-11 at 14:14, Rod Taylor wrote: > > > set enable_hashjoin = false; > > > > BINGO! > > I'm not so sure about that. Your dataset seems to have changed fairly > significantly since the last test. > > > -> Index Scan using feature_pkey on feature f (cost=0.00..134592.43 rows=47912 width=39) (actual time=0.46..502.50 rows=431 loops=1) > > Notice it only pulled out 431 rows where prior runs pulled out several > thousand (~13000). I think what really happened was something came > along and deleted a bunch of stuff, then vacuum ran. There is nearly a zero chance that happened. This database is accessible only by me, I haven't deleted anything. The only things I have done is to create and drop various indexes and run vacuum. Is there anything else that could explain the difference? Is the index scan on feature_pkey using information from the index scan on featureloc_src_6 to limit the number of rows to get from feature? Scott -- ------------------------------------------------------------------------ Scott Cain, Ph. D. cain@cshl.org GMOD Coordinator (http://www.gmod.org/) 216-392-3087 Cold Spring Harbor Laboratory