pgsql: Improve GIN indexscan cost estimation.
От | Tom Lane |
---|---|
Тема | pgsql: Improve GIN indexscan cost estimation. |
Дата | |
Msg-id | E1P7dyi-0003Rw-1R@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Improve GIN indexscan cost estimation. The better estimate requires more statistics than we previously stored: in particular, counts of "entry" versus "data" pages within the index, as well as knowledge of the number of distinct key values. We collect this information during initial index build and update it during VACUUM, storing the info in new fields on the index metapage. No initdb is required because these fields will read as zeroes in a pre-existing index, and the new gincostestimate code is coded to behave (reasonably) sanely if they are zeroes. Teodor Sigaev, reviewed by Jan Urbanski, Tom Lane, and Itagaki Takahiro. Branch ------ master Details ------- http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=48c7d9f6ff99714495b7d6d2ebc44fbbe992cc8f Modified Files -------------- src/backend/access/gin/ginbtree.c | 23 ++- src/backend/access/gin/gindatapage.c | 11 +- src/backend/access/gin/ginentrypage.c | 16 +- src/backend/access/gin/ginfast.c | 4 +- src/backend/access/gin/gininsert.c | 56 ++++-- src/backend/access/gin/ginutil.c | 85 ++++++++ src/backend/access/gin/ginvacuum.c | 26 ++- src/backend/access/gin/ginxlog.c | 2 +- src/backend/utils/adt/selfuncs.c | 344 ++++++++++++++++++++++++++++++++- src/include/access/gin.h | 36 +++- 10 files changed, 561 insertions(+), 42 deletions(-)
В списке pgsql-committers по дате отправления: