X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0F5E03A4155 for ; Tue, 9 Nov 2004 00:32:01 +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 97155-08 for ; Tue, 9 Nov 2004 00:31:53 +0000 (GMT) Received: from ct.radiology.uiowa.edu (ct.radiology.uiowa.edu [129.255.60.186]) by svr1.postgresql.org (Postfix) with ESMTP id 3B1273A414E for ; Tue, 9 Nov 2004 00:31:55 +0000 (GMT) Received: from [192.168.1.11] (12-217-241-0.client.mchsi.com [12.217.241.0]) by ct.radiology.uiowa.edu (8.11.6/8.11.6) with ESMTP id iA90Vf300790; Mon, 8 Nov 2004 18:31:41 -0600 Message-ID: <41900FE5.2090704@johnmeinel.com> Date: Mon, 08 Nov 2004 18:31:33 -0600 From: John Meinel User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: patrick ~ Cc: pgsql-performance@postgresql.org Subject: Re: vacuum analyze slows sql query References: <20041108231951.23927.qmail@web52105.mail.yahoo.com> In-Reply-To: <20041108231951.23927.qmail@web52105.mail.yahoo.com> X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE0CE1ACB02487EF4C0F09CAB" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/153 X-Sequence-Number: 9107 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE0CE1ACB02487EF4C0F09CAB Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit patrick ~ wrote: > Hi John, > > Thanks for your reply and analysis. > > > --- John Meinel wrote: > > >>patrick ~ wrote: >>[...] >> >>>pkk=# explain analyze execute pkk_01( 241 ); >>> QUERY PLAN >>> >> One other thing that I just thought of. I think it is actually possible to add an index on a function of a column. So if you have the "is_really_pending" function, you might be able to do: CREATE INDEX pkk_is_really_pending ON pkk_purchase (is_really_pending(purchase_id)); But you need a better guru than I to make sure of that. This *might* do what you need. John =:-> --------------enigE0CE1ACB02487EF4C0F09CAB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBkA/lJdeBCYSNAAMRArEdAKCKph0OZ+vBCtZmnXbHYwuv9nNJzACbBUfb zLTb4X5jVoDcoGL9fNJsrOA= =CxJ2 -----END PGP SIGNATURE----- --------------enigE0CE1ACB02487EF4C0F09CAB--