X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6FFAE475B8E for ; Fri, 14 Feb 2003 19:11:53 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 7FEA84759AF for ; Fri, 14 Feb 2003 19:11:52 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h1F0Bq5u012379; Fri, 14 Feb 2003 19:11:52 -0500 (EST) To: SLetovsky@aol.com Cc: cain@cshl.org, pgsql-performance@postgresql.org, gmod-schema@lists.sourceforge.net Subject: Re: [Gmod-schema] Re: performace problem after VACUUM ANALYZE In-reply-to: <27.394f051e.2b7eded5@aol.com> References: <27.394f051e.2b7eded5@aol.com> Comments: In-reply-to SLetovsky@aol.com message dated "Fri, 14 Feb 2003 19:07:49 -0500" Date: Fri, 14 Feb 2003 19:11:52 -0500 Message-ID: <12378.1045267912@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/91 X-Sequence-Number: 1147 SLetovsky@aol.com writes: > Am I correct in interpreting your comments as saying you believe that > if we could lose the OR and the strand constraint PG would probably > use the index properly? No, I said I thought it could do it without that ;-). But yes, you'd have a much less fragile query if you could lose the OR condition. Have you looked into using a UNION ALL instead of OR to merge the two sets of results? It sounds grotty, but might be faster... regards, tom lane