Re: Indexes not used in 7.1RC4: Bug?

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: Indexes not used in 7.1RC4: Bug?
Дата
Msg-id 3AD47334.25B9AC9A@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: Indexes not used in 7.1RC4: Bug?  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
> What about going the other way around... Promote the int2 to an int4
> (lossless).  Actually for all int1,int2 datatypes (regardless of whether it
> was the constant or the column) you could promote all to a common int4 and
> then do comparisons.

That is why the index is not used: the backend is promoting all of the
int2 column values to 
int4 for the comparison, and concludes that the available index is not
relevant.

The index traversal code would need to know how to promote individual
values in the index for comparison, which is an interesting idea but I
haven't thought about how efficient it would be. Clearly the cost would
be different than a simple comparison.
                      - Thomas


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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: Re: HOLD THE PRESSES!! ... pg_dump from v7.0.3 can't import to v7.1?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Re: HOLD THE PRESSES!! ... pg_dump from v7.0.3 can't import to v7.1?