| От | Robert Berger |
|---|---|
| Тема | Re: int8 indices? |
| Дата | |
| Msg-id | 3B700E31.604E9135@vtiscan.com обсуждение исходный текст |
| Ответ на | int8 indices? (hubert depesz lubaczewski <depesz@depesz.pl>) |
| Список | pgsql-general |
I got burned by this recently and found the answer on the net: When selecting on a column with an INT8 index, alway put quotes around the constant value: select * from a where id = '6970'; Otherwise the constant is assumed to be an INT4, which doesn't match the type in the index, so the index is not used. > of course i vacuum'ed, but when i select anything from the table i get > seqscan: > depesz=# explain select * from a where id = 6970; > NOTICE: QUERY PLAN: > > Seq Scan on a (cost=0.00..465.76 rows=1 width=8) > > EXPLAIN > > what could be possible reason? >
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера