Re: Need to increase performance of a query

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Need to increase performance of a query
Дата
Msg-id 4C11469A.8000706@joeconway.com
обсуждение исходный текст
Ответ на Re: Need to increase performance of a query  (Anne Rosset <arosset@collab.net>)
Ответы Re: Need to increase performance of a query  (Joe Conway <mail@joeconway.com>)
Список pgsql-performance
On 06/10/2010 12:56 PM, Anne Rosset wrote:
> Craig James wrote:
>>   create index item_rank_null_idx on item_rank(pf_id)
>>    where item_rank.pf_id is null;
>>
>> Craig
>>
> Hi Craig,
> I tried again after adding your suggested index but I didn't see any
> improvements: (seems that the index is not used)

>                 Filter: ((rank IS NOT NULL) AND (pf_id IS NULL) AND
> ((project_id)::text = 'proj2783'::text))
> Total runtime: 11.988 ms
> (6 rows)
>
> Time: 13.654 ms

try:

create index item_rank_null_idx on item_rank(pf_id)
where rank IS NOT NULL AND pf_id IS NULL;

Joe


Вложения

В списке pgsql-performance по дате отправления:

Предыдущее
От: Anne Rosset
Дата:
Сообщение: Re: Need to increase performance of a query
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Need to increase performance of a query