Re: Bug #848: Index on bigint column is unused in selects

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Bug #848: Index on bigint column is unused in selects
Дата
Msg-id 1040016995.352.1.camel@tokyo
обсуждение исходный текст
Ответ на Bug #848: Index on bigint column is unused in selects  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
On Sat, 2002-12-14 at 15:33, pgsql-bugs@postgresql.org wrote:
> PostgreSQL 7.2 will allways do a full table scan when the index field
> is a bigint. even with a "where bigkey = 99" clause.

This is a known problem: you need to enclose the integer literal in
single quotes, or cast it to int8 for the optimizer to consider an index
scan. i.e

select * from test1 where een = '99';

Cheers,

Neil

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

Предыдущее
От: Frank van Vugt
Дата:
Сообщение: v7.3 : \encoding doesn't show changes in client encoding that are not done with \encoding itself (i.e. set names/set client_encoding)
Следующее
От: Robert Treat
Дата:
Сообщение: odd behavior: function not atomic/not seeing it's own updates/not acting serializable nor read committed