Re: Query tuning help

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query tuning help
Дата
Msg-id 15734.1115605731@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query tuning help  (Dan Harris <fbsd@drivefaster.net>)
Список 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 по дате отправления:

Предыдущее
От: Geoffrey
Дата:
Сообщение: Re: Whence the Opterons?
Следующее
От: Dan Harris
Дата:
Сообщение: Re: Query tuning help