pgsql: Make a marginal performance improvement in predicate_implied_by
В списке pgsql-committers по дате отправления:
| От | tgl@postgresql.org (Tom Lane) |
|---|---|
| Тема | pgsql: Make a marginal performance improvement in predicate_implied_by |
| Дата | |
| Msg-id | 20090510224528.393E4754067@cvs.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Log Message:
-----------
Make a marginal performance improvement in predicate_implied_by and
predicate_refuted_by: if either top-level input is a single-element list,
reduce it to its lone member before proceeding. This avoids
a useless level of AND-recursion within the recursive proof routines.
It's worth doing because, for example, if the clause is a 100-element
list and the predicate is a 1-element list then we'd otherwise strip
the predicate's list structure 100 times as we iterate through the clause.
It's only needed at top level because there won't be any trivial ANDs below
that --- this situation is an artifact of the decision to represent even
single-item conditions as Lists in the "implicit AND" format, and that format
is only used at the top level of any predicate or restriction condition.
Modified Files:
--------------
pgsql/src/backend/optimizer/util:
predtest.c (r1.24 -> r1.25)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/predtest.c?r1=1.24&r2=1.25)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера