Re: Planner forces seq scan when select without quoting its values

Поиск
Список
Период
Сортировка
От Alex Lai
Тема Re: Planner forces seq scan when select without quoting its values
Дата
Msg-id 50574036.2060808@sesda2.com
обсуждение исходный текст
Ответ на Planner forces seq scan when select without quoting its values  (Alex Lai <mlai@sesda2.com>)
Список pgsql-general
> This line from the EXPLAIN output suggests that the rule is causing a
> seq scan
> to be used instead on an index scan:
>
>   ... WHERE ...   a.archiveset = new.archiveset AND a.fileid <>
> new.fileid.
>
> When I replace the "new." with actual integers:
>
>   ... WHERE ...   a.archiveset = 10003 AND a.fileid <>  35352974,
>
> the problem goes away.
>
> That makes me think that the planner is unable to find the index, so
> it instead
> uses a seq scan.
>
I still don't have find any good suggestion.
If the cause by the key word "new" or "old" in the rule, the planner is
confused which index to use.
I think this is should be considered as a bug for rule system related to
planner.  I am not sure 9.2 will address this issue.

--
Best regards,


Alex Lai
OMI SIPS DBA ADNET Systems , Inc.
7515 Mission Drive,
Suite A100 Lanham, MD 20706
301-352-4657 (phone)
301-352-0437 (fax)
alai@sesda2.com



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Slow counting still true?
Следующее
От: Edson Richter
Дата:
Сообщение: Re: Slow counting still true?