Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition

Поиск
Список
Период
Сортировка
От Netskin | Corin Langosch
Тема Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition
Дата
Msg-id 4CB199FC.6070300@netskin.com
обсуждение исходный текст
Ответ на Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 10.10.2010 05:26, Tom Lane wrote:
> Try it like
>
>      WHERE amazon_product_id IS NOT NULL;
>
You are right. When I change the condition on the index like this, the
index gets used as it should. Even without having to specify the extra
not null condition in the query.

> We don't expend an infinite number of cycles on rewriting different
> query formulations into each other, and that's one of the ones we
> don't handle ...
>
The problem is the code is generated by an ORM and so cannot easily be
modified. I can understand that you wont spend the time for each query,
but I think for (normally) very seldom used things like creating new
indices it would be a good enhancement.

Corin

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition