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 DD0C59FA5E6 for ; Thu, 22 Jun 2006 21:44:02 -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 77339-06 for ; Thu, 22 Jun 2006 21:43:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E356C9FA2F4 for ; Thu, 22 Jun 2006 21:43:54 -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 k5N0hql8009443; Thu, 22 Jun 2006 20:43:52 -0400 (EDT) To: Richard Frith-Macdonald cc: pgsql-performance@postgresql.org Subject: Re: Why is my (empty) partial index query slow? In-reply-to: References: <5510ED72-8266-438B-A4DF-9591ED26BA38@tiptree.demon.co.uk> <511.1150992297@sss.pgh.pa.us> Comments: In-reply-to Richard Frith-Macdonald message dated "Thu, 22 Jun 2006 17:28:11 +0100" Date: Thu, 22 Jun 2006 20:43:52 -0400 Message-ID: <9442.1151023432@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/458 X-Sequence-Number: 19815 Richard Frith-Macdonald writes: > What has confused me is why a query using an empty index should be > slow, irrespective of the state of the table that the index applies to. Is it actually empty, or have you just deleted-and-not-yet-vacuumed all the rows in the index? I had hoped to see comparative EXPLAIN ANALYZE output for the fast and slow cases. Maybe when it gets slow again you could redo the explain. regards, tom lane