Re: select is not using index?

Поиск
Список
Период
Сортировка
От Mark Harrison
Тема Re: select is not using index?
Дата
Msg-id 40227DEC.5010007@pixar.com
обсуждение исходный текст
Ответ на select is not using index?  (Mark Harrison <mh@pixar.com>)
Список pgsql-performance
Corey Edwards wrote:

> Your column is a bigint but 123 defaults to type int. Indexes aren't
> used when there's a type mismatch. Use an explicit cast or quote it:
>
>   select * from bigtable where id = 123::bigint;
>
> Or
>
>   select * from bigtable where id = '123';

Thanks Corey, both of these do exactly what I need...

Cheers,
Mark

--
Mark Harrison
Pixar Animation Studios


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

Предыдущее
От: "Damien Dougan"
Дата:
Сообщение: Re: Index Performance Help
Следующее
От: Orion Henry
Дата:
Сообщение: Re: 7.3 vs 7.4 performance