| От | Tom Lane |
|---|---|
| Тема | Re: Constraint exclusion oddity with composite index |
| Дата | |
| Msg-id | 23786.1180732094@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Constraint exclusion oddity with composite index ("Joshua D. Drake" <jd@commandprompt.com>) |
| Ответы |
Re: Constraint exclusion oddity with composite index
|
| Список | pgsql-hackers |
"Joshua D. Drake" <jd@commandprompt.com> writes:
> Tom Lane wrote:
>> "Joshua D. Drake" <jd@commandprompt.com> writes:
>>> Assume the following:
>>> index on: (id, adate)
>>> constraint CHECK(adate > '01-01-2007' AND adate < '04-01-2007');
>>> The planner will not use the index listed above.
>>
>> For what?
> select adate from parent where adate = '01-25-2007'
That's unsurprising. Searching with only a lower-order index column
value seldom wins, 'cause you've got to scan the entire index. The
constraint is irrelevant to this.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера