Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7EBE49FBB2E for ; Thu, 12 Apr 2007 21:20:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 00751-06 for ; Thu, 12 Apr 2007 21:20:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 7B8519FBB7C for ; Thu, 12 Apr 2007 21:20:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l3D0K6L3010504; Thu, 12 Apr 2007 20:20:06 -0400 (EDT) To: Steve cc: Scott Marlowe , PostgreSQL Performance Subject: Re: Strangely Variable Query Performance In-reply-to: References: <57271CC2-BCB1-4ACA-A177-4FF64F1BC33F@brandeis.edu> <16E9A17C-ADFA-43B2-B7EA-5C7A4D7E96D1@event-s.net> <0914C05F-BA1B-4A6C-A1B1-52256BC851A4@event-s.net> <1176396964.13754.16.camel@state.g2switchworks.com> <1176414724.13754.23.camel@state.g2switchworks.com> <1176416077.13754.26.camel@state.g2switchworks.com> <9833.1176418809@sss.pgh.pa.us> <10117.1176420763@sss.pgh.pa.us> <10355.1176422445@sss.pgh.pa.us> Comments: In-reply-to Steve message dated "Thu, 12 Apr 2007 20:05:48 -0400" Date: Thu, 12 Apr 2007 20:20:06 -0400 Message-ID: <10503.1176423606@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/283 X-Sequence-Number: 24160 Steve writes: > Either way, it runs perfectly fast. So it looks like the indexes are > confusing this query like you suspected. Any advise? Wow --- sometimes grasping at straws pays off. I was testing here with just a subset of the indexes to save build time, but I bet that one of the "irrelevant" ones is affecting this somehow. Time to re-test. If you have some time to kill, it might be interesting to vary that begin/rollback test script to leave one or two other indexes in place, and see if you can identify exactly which other index(es) get it confused. I'm about to go out to dinner with the wife, but will have a closer look when I get back, or tomorrow morning. We'll figure this out. regards, tom lane