X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B211A476128 for ; Fri, 11 Apr 2003 17:43:03 -0400 (EDT) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 9AB82475F1B for ; Fri, 11 Apr 2003 17:43:02 -0400 (EDT) Received: from [66.219.92.2] (HELO temoku) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2957495; Fri, 11 Apr 2003 14:42:57 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Itai Zukerman Subject: Re: count(*), EXISTS, indexes Date: Fri, 11 Apr 2003 14:42:48 -0700 User-Agent: KMail/1.4.3 Cc: pgsql-sql@postgresql.org References: <874r54sr8q.fsf@matt.w80.math-hat.com> <200304111353.50162.josh@agliodbs.com> <871y08sq0e.fsf@matt.w80.math-hat.com> In-Reply-To: <871y08sq0e.fsf@matt.w80.math-hat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200304111442.48107.josh@agliodbs.com> X-Spam-Status: No, hits=-22.7 required=5.0 tests=BAYES_01,IN_REP_TO,REFERENCES,USER_AGENT_KMAIL autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/187 X-Sequence-Number: 12888 Itai, > # explain select sum(weight) from rprofile rp where exists (select 1 fr= om=20 rcount_prof rcp where rcp.profile ~<=3D rp.profile and ~rcp.psig ~<=3D rp.p= sig=20 and rcp.filter=3D'{734,1944}'); I'm not familiar with the "~" that you have in the query. What are those f= or? Do you have an index on rcp.profile, rcp.psig, rcp.filter? --=20 -Josh Berkus Aglio Database Solutions San Francisco