| От | Gaetano Mendola |
|---|---|
| Тема | Re: indexed column but queries still slow |
| Дата | |
| Msg-id | 4122949D.7060801@bigfoot.com обсуждение исходный текст |
| Ответ на | indexed column but queries still slow (Amir Zicherman <amir.zicherman@gmail.com>) |
| Список | pgsql-novice |
Amir Zicherman wrote: > hi, > > i have a btree index on col1 in table1. The column has either values > 1,2,3, or 4. 4 does not appear that much in the table (only 5 times). > there are about 20 million rows in the table. when i do a "select * > from table1 where col1=4" it takes very long time to get back to me > (around 4 minutes). why is it taking so long if i have an index on > it? I also tried this with a hash index and it was still slow. May I see the result of explain analyze select * from table1 where col1 = 4; and also the table definition could be usefull. Did you run recently an analyze on your table ? Regards Gaetano Mendola
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера