pgsql: Do ScalarArrayOp estimation correctly when array is a stable exp
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Do ScalarArrayOp estimation correctly when array is a stable exp |
| Дата | |
| Msg-id | E1WGyJA-0000cU-Kd@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Do ScalarArrayOp estimation correctly when array is a stable expression. Most estimation functions apply estimate_expression_value to see if they can reduce an expression to a constant; the key difference is that it allows evaluation of stable as well as immutable functions in hopes of ending up with a simple Const node. scalararraysel didn't get the memo though, and neither did gincost_opexpr/gincost_scalararrayopexpr. Fix that, and remove a now-unnecessary estimate_expression_value step in the subsidiary function scalararraysel_containment. Per complaint from Alexey Klyukin. Back-patch to 9.3. The problem goes back further, but I'm hesitant to change estimation behavior in long-stable release branches. Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/e8655a77f327bd3fca0f4aaf14b86b540c64ecdf Modified Files -------------- src/backend/utils/adt/array_selfuncs.c | 15 ++++++++------- src/backend/utils/adt/selfuncs.c | 22 ++++++++++++++++++---- 2 files changed, 26 insertions(+), 11 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера