pgsql: Improve statistics estimation for single-column GROUP BY in sub-

Поиск
Список
Период
Сортировка
Искать

pgsql: Improve statistics estimation for single-column GROUP BY in sub-

От:
Alexander Korotkov <akorotkov@postgresql.org>
Дата:
Improve statistics estimation for single-column GROUP BY in sub-queries

This commit follows the idea of the 4767bc8ff2.  If sub-query has only one
GROUP BY column, we can consider its output variable as being unique. We can
employ this fact in the statistics to make more precise estimations in the
upper query block.

Author: Andrei Lepikhov 
Reviewed-by: Heikki Linnakangas 
Reviewed-by: Alexander Korotkov 

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e983ee9380fcac746f9b6b7c360d255d9fcd0907

Modified Files
--------------
src/backend/utils/adt/selfuncs.c        | 53 +++++++++++++++++++--------------
src/include/utils/selfuncs.h            |  3 +-
src/test/regress/expected/stats_ext.out | 15 ++++++++++
src/test/regress/sql/stats_ext.sql      | 12 ++++++++
4 files changed, 60 insertions(+), 23 deletions(-)

FAQ