| От | pgsql-general@list.coretech.ro |
|---|---|
| Тема | specify whitch index to use |
| Дата | |
| Msg-id | 45574DA4.9090206@list.coretech.ro обсуждение исходный текст |
| Ответы |
Re: specify whitch index to use
|
| Список | pgsql-general |
hello, I have two indexes on a table on cols col1 and col2, the table has ~10M rows on pg v8.1.4 when I use "where col1 = val1" the query is fast and returns 0 rows when I use "where col2 > val2" the query is slow and returns ~1M rows in both cases the corresponding indexes are used. when I use "where col1 = val1 and col2 > val2" the query is slow and returns 0 rows using the index on col2 is there any way for postgres to use both indexes when relevant columns are present in a where clause ? is it possible to specify which index to use in a query ? thanks, razvan radu
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера