Re: Strange logic for partial index proving
От | Tom Lane |
---|---|
Тема | Re: Strange logic for partial index proving |
Дата | |
Msg-id | 20787.1119394154@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Strange logic for partial index proving ("Jim C. Nasby" <decibel@decibel.org>) |
Список | pgsql-hackers |
"Jim C. Nasby" <decibel@decibel.org> writes: > Has anyone looked at how hard it would be to identify impossible > conditions as part of planning the query? The question in my mind is not so much how hard it would be as how many cycles we would waste trying to prove things that won't be true for 99.999% of queries. There is always a tradeoff involved when you add more processing to the planner, and in this case I can't believe that it would be a win. Simon is looking at a different and much more constrained case (WHERE clause provably inconsistent with check constraints of individual tables in an inheritance hierarchy), and so the risk of wasted processing doesn't loom so large. Note also that when the contradictory constraints are on a column of a btree index, the amount you save by recognizing the condition in the planner isn't all that great, since the btree index code discovers it during plan startup anyway. regards, tom lane
В списке pgsql-hackers по дате отправления: