| От | vinny |
|---|---|
| Тема | Re: [GENERAL] Multicolumn Index on OR conditions |
| Дата | |
| Msg-id | 9778dd18b837108c9df768e012927f15@xs4all.nl обсуждение |
| Ответ на | [GENERAL] Multicolumn Index on OR conditions (Job <Job@colliniconsulting.it>) |
| Список | pgsql-general |
On 2017-09-19 10:08, Job wrote: > Hi, > > within a query with two or more conditions with "OR", example: > > "where a = 2 or b < 3" > > could be useful to speed up the query a multi-column index (a,b) even > though the two conditions are in "OR" and not in "AND"? > > Thank you! > F Having any kind of index usually better than none because it may prevent a seqscan, but an OR probably works faster if you have a separate index on B. But, EXPLAIN can show you what the database actually does, and give some indication of why it thinks it should do it that way. regards, Vincent. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера