| От | Antony Paul |
|---|---|
| Тема | Index not used with or condition |
| Дата | |
| Msg-id | 2989532e05020701073638ca4c@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: Index not used with or condition
|
| Список | pgsql-performance |
Hi all,
I am facing a strange problem when I run EXPLAIN against a table
having more than 100000 records. The query have lot of OR conditions
and when parts of the query is removed it is using index. To analyse
it I created a table with a single column, inserted 100000
records(random number) in it created index and run a query which
returns 1 record which have no or condition and it was using index. I
added an OR conditon and is using sequential scan. I set the
enable_seqscan to off. I ran the tests again and is using index scan.
So which one I have to use. Is this any bug in Explain.
rgds
Antony Paul.
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера