Re: Partial index where clause not filtering through
От | Tom Lane |
---|---|
Тема | Re: Partial index where clause not filtering through |
Дата | |
Msg-id | 26793.1055742214@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Partial index where clause not filtering through ("Jim C. Nasby" <jim@nasby.net>) |
Ответы |
Re: Partial index where clause not filtering through
|
Список | pgsql-performance |
"Jim C. Nasby" <jim@nasby.net> writes: > As-is, it won't use the index. i.address_v IS NOT NULL AND s.addr_high_v > >= i.address_v should mandate that s.addr_high_v must be not-null, Actually, if the >= operator is strict then it implies both NOT NULL conditions. But I am not excited about putting some kind of theorem prover into the partial-index logic. That is a recipe for chewing up huge numbers of cycles trying (and, likely, failing) to prove that a partial index is safe to use with the current query. Inference rules that are limited to strict operators and NOT NULL clauses wouldn't cost as much as a general theorem prover, but they'd not find useful improvements as often, either. So the question is still whether the game is worth the candle. How often do you think this would win, and is that worth the planner cycles expended on every query to find out if it wins? regards, tom lane
В списке pgsql-performance по дате отправления: