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 5FD3E538A4 for ; Sun, 8 May 2005 23:28:51 -0300 (ADT) 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 51272-10 for ; Mon, 9 May 2005 02:28:49 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id CC157537CB for ; Sun, 8 May 2005 23:28:48 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j492Spsk015735; Sun, 8 May 2005 22:28:51 -0400 (EDT) To: Dan Harris Cc: pgsql-performance@postgresql.org Subject: Re: Query tuning help In-reply-to: <6f4a543a2fbd348c7e82876b8e477600@drivefaster.net> References: <924ac6c029f5453c442eacdda06b132c@drivefaster.net> <200505091051.14689.mr-russ@pws.com.au> <6f4a543a2fbd348c7e82876b8e477600@drivefaster.net> Comments: In-reply-to Dan Harris message dated "Sun, 08 May 2005 19:49:30 -0600" Date: Sun, 08 May 2005 22:28:51 -0400 Message-ID: <15734.1115605731@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/94 X-Sequence-Number: 12258 Dan Harris writes: >> -> Index Scan using ea1 on ea (cost=0.00..2736.43 rows=42 width=47) (actual time=2.085..2.309 rows=2 loops=473) >> Index Cond: ((ea.incidentid)::text = ("outer".incidentid)::text) >> Filter: (((recordtext)::text ~~ '%RED%'::text) OR ((recordtext)::text ~~ '%CORVETTE%'::text)) > Doesn't that mean it was using an index to filter? No. The "Index Cond" shows it is using the index only for the join condition. A "Filter" is an additional filter condition that happens to get applied at this plan node --- but it'll be applied to every row the index finds for the index condition. regards, tom lane