Re: Query tuning help

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dan Harris <fbsd(at)drivefaster(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query tuning help
Date: 2005-05-09 02:28:51
Message-ID: 15734.1115605731@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dan Harris <fbsd(at)drivefaster(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dan Harris 2005-05-09 02:31:38 Re: Query tuning help
Previous Message Geoffrey 2005-05-09 02:17:41 Re: Whence the Opterons?