| От | Josh Berkus |
|---|---|
| Тема | Re: Query is not using index when it should |
| Дата | |
| Msg-id | 200412121848.27513.josh@agliodbs.com обсуждение исходный текст |
| Ответ на | Query is not using index when it should (tomas@nocrew.org (Tomas Skäre)) |
| Список | pgsql-performance |
Tomas, > I tried to subscribe to pgsql-performance, but there seems to be > something wrong with the majordomo, so I'm sending to general too, > where I'm already subscribed. Well, I got your e-mail, so obviously you're subscribed to Performance. > But when doing a search with objectid, class and field, it doesn't use > the idx_cjm_object1 index. > db=# explain analyze select * from cjm_object where objectid=4534 and > class=12 and field='paroid'; QUERY PLAN Try: explain analyze select * from cjm_object where objectid=4534::BIGINT and class=12 and field='paroid'; Sometimes the planner needs a little extra help on BIGINT fields. This problem is fixed in 8.0. -- Josh Berkus Aglio Database Solutions San Francisco
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера