-
- Downloads
Rewrite of planner statistics-gathering code. ANALYZE is now available as
a separate statement (though it can still be invoked as part of VACUUM, too). pg_statistic redesigned to be more flexible about what statistics are stored. ANALYZE now collects a list of several of the most common values, not just one, plus a histogram (not just the min and max values). Random sampling is used to make the process reasonably fast even on very large tables. The number of values and histogram bins collected is now user-settable via an ALTER TABLE command. There is more still to do; the new stats are not being used everywhere they could be in the planner. But the remaining changes for this project should be localized, and the behavior is already better than before. A not-very-related change is that sorting now makes use of btree comparison routines if it can find one, rather than invoking '<' twice.
Showing
- doc/src/sgml/catalogs.sgml 154 additions, 29 deletionsdoc/src/sgml/catalogs.sgml
- doc/src/sgml/indices.sgml 2 additions, 2 deletionsdoc/src/sgml/indices.sgml
- doc/src/sgml/ref/allfiles.sgml 2 additions, 1 deletiondoc/src/sgml/ref/allfiles.sgml
- doc/src/sgml/ref/alter_table.sgml 17 additions, 9 deletionsdoc/src/sgml/ref/alter_table.sgml
- doc/src/sgml/ref/analyze.sgml 219 additions, 0 deletionsdoc/src/sgml/ref/analyze.sgml
- doc/src/sgml/ref/vacuum.sgml 23 additions, 26 deletionsdoc/src/sgml/ref/vacuum.sgml
- doc/src/sgml/reference.sgml 2 additions, 1 deletiondoc/src/sgml/reference.sgml
- doc/src/sgml/xoper.sgml 2 additions, 2 deletionsdoc/src/sgml/xoper.sgml
- src/backend/access/common/tupdesc.c 9 additions, 9 deletionssrc/backend/access/common/tupdesc.c
- src/backend/access/gist/gist.c 8 additions, 8 deletionssrc/backend/access/gist/gist.c
- src/backend/access/hash/hash.c 6 additions, 6 deletionssrc/backend/access/hash/hash.c
- src/backend/access/heap/tuptoaster.c 38 additions, 1 deletionsrc/backend/access/heap/tuptoaster.c
- src/backend/access/nbtree/nbtree.c 6 additions, 6 deletionssrc/backend/access/nbtree/nbtree.c
- src/backend/access/rtree/rtree.c 6 additions, 6 deletionssrc/backend/access/rtree/rtree.c
- src/backend/catalog/genbki.sh 5 additions, 2 deletionssrc/backend/catalog/genbki.sh
- src/backend/catalog/heap.c 66 additions, 59 deletionssrc/backend/catalog/heap.c
- src/backend/catalog/index.c 24 additions, 58 deletionssrc/backend/catalog/index.c
- src/backend/commands/analyze.c 1426 additions, 454 deletionssrc/backend/commands/analyze.c
- src/backend/commands/command.c 111 additions, 17 deletionssrc/backend/commands/command.c
- src/backend/commands/vacuum.c 138 additions, 103 deletionssrc/backend/commands/vacuum.c
Loading
Please register or sign in to comment