pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dan Harris <fbsd@drivefaster.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query tuning help
Date: Sun, 08 May 2005 22:28:51 -0400
Message-ID: <15734.1115605731@sss.pgh.pa.us> (raw)
In-Reply-To: <6f4a543a2fbd348c7e82876b8e477600@drivefaster.net>
References: <924ac6c029f5453c442eacdda06b132c@drivefaster.net>
	<200505091051.14689.mr-russ@pws.com.au>
	<6f4a543a2fbd348c7e82876b8e477600@drivefaster.net>

Dan Harris <fbsd@drivefaster.net> 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



view thread (22+ messages)  latest in thread

Message-ID: <15734.1115605731@sss.pgh.pa.us>
Permalink:  ../15734.1115605731@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15734.1115605731@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, fbsd@drivefaster.net
  Subject: Re: Query tuning help
  In-Reply-To: <15734.1115605731@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox