| От | Doug Fields |
|---|---|
| Тема | Re: index not being used |
| Дата | |
| Msg-id | 5.1.0.14.2.20021214161335.0209c838@pop.pexicom.com обсуждение исходный текст |
| Ответ на | index not being used (Reynard Hilman <reynardmh@lightsky.com>) |
| Ответы |
Re: index not being used
|
| Список | pgsql-general |
You're missing an analyze step: (see below) >here is the table structure: >create table test_10million ( >id int8, >app_id int8 >); > >< fill the table with 10 million record > > >create index test_10million_id on test_10million (id); ANALYZE test_10million; >this query always uses sequential scan: >select * from test_10million where id = 123 and app_id = 100; Now try explain select * from test_10million where id = 123 and app_id = 100; Cheers, Doug
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера