Re: Query tuning help - Mailing list pgsql-performance

From Tom Lane
Subject Re: Query tuning help
Date
Msg-id 15734.1115605731@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query tuning help  (Dan Harris <fbsd@drivefaster.net>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Geoffrey
Date:
Subject: Re: Whence the Opterons?
Next
From: Dan Harris
Date:
Subject: Re: Query tuning help