Extended statistics
Multi-column planner statistics created with CREATE STATISTICS: ndistinct, functional dependencies, MCV lists and expression statistics. Introduced in PostgreSQL 10.
Versions
- PostgreSQL 20 · worked-on · improved · moderate
- PostgreSQL 19 · shipped · improved · minor · 1 commit · +13 / -7 lines
- PostgreSQL 18 · worked-on · improved · moderate
- PostgreSQL 17 · worked-on · improved · moderate
Threads
- examine_variable ignored CollateExpr
- Preserve statistics targets with ALTER TABLE ALTER COLUMN TYPE
- BUG #19772: ERROR: corrupt MVNDistinct entry for GROUP BY c0, ROLLUP (abs(c0)) with ndistinct statistics
- BUG #19833: ALTER TABLE that rebuilds an extended statistics object silently drops its SET STATISTICS target (st
- BUG #19849: queries fail after ANALYZE with expression stats on arrays
- BUG #19763: ManualBug2 NULL pointer dereference in make_build_data via examine_expression bypass of lookup_var_a
- Assertion failure in dependencies_clauselist_selectivity with two clauses on the same statistics expression
- BUG #19789: "expression not found in statistics object" for a boolean domain column in an MCV statistics object
- Memory leak in statext_ndistinct_build() during ANALYZE
- Extended statistics improvement: multi-column MCV missing values
- [PATCH] Remove obsolete tupDesc assignment in extended statistics
- Fix incorrect size check in statext_dependencies_deserialize
- BUG #19481: multivariate MCV expression stats not applied for equivalent predicates on nullable side of LEFT JOI
- misleading error message in ProcessUtilitySlow T_CreateStatsStmt
- Are extended statistics intentionally not propagated to partitions?
- Inconsistency in owner assignment between INDEX and STATISTICS
- Adjust error message for CREATE STATISTICS to account for expressions
- Defects with invalid stats data for expressions in extended stats
- code cleanup for CREATE STATISTICS
- StatisticsObjIsVisibleExt lacks "do not look in temp namespace"
- Showing applied extended statistics in explain Part 2
- Performance optimization for ANALYZE with extended statistics (dependencies)
- Tests for extended MCV stats compatibility with multi-filter conditions on a single column
- Removing unused parameter in compute_expr_stats
- Add support for (Var op Var) clause in extended MCV statistics
- BUG #18468: CREATE TABLE ... LIKE leaves orphaned column reference in extended statistics
- BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722
- Multidimensional Histograms
- [PATCH] pg_dump: Do not dump statistics for excluded tables
- Postgres picks suboptimal index after building of an extended statistics
- XX000: tuple concurrently deleted during DROP STATISTICS
- extended statistics n-distinct on multiple columns not used when join two tables
- BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables
- ERROR: PlaceHolderVar found where not expected
- pg_statistic MCVs use float4 but extended stats use float8
- pg15 inherited stats expressions: cache lookup failed for statistics object
- Use extended statistics to estimate (Var op Var) clauses
- CREATE STATISTICS and partitoins/inheritance
- Empty values of pg_stats_ext when table is empty
- Expr. extended stats are skipped with equality operator
- BUG #17570: Unrecognized node type for query with statistics on expressions
- Showing applied extended statistics in explain
- Make name optional in CREATE STATISTICS
- should check interrupts in BuildRelationExtStatistics ?
- [RFC] Improving multi-column filter cardinality estimation using MCVs and HyperLogLog
- PG15 beta1 fix pg_stats_ext/pg_stats_ext_exprs view manual
- stxkind only explain two elements. left two unexplained.
- extended stats on partitioned tables
- Add prefix pg_catalog to pg_get_statisticsobjdef_columns() in describe.c (\dX)
- Possible Documentation Update for ALTER STATISTICS
- mem context is not reset between extended stats
- extended stats objects are the only thing written like "%s"."%s"
- PoC/WIP: Extended statistics on expressions
- Bug fix for cache lookup failure for statistic_ext type
- list of extended statistics on psql
- Added documentation for cascade and restrict option of drop statistics
- cache lookup failed for statistics object 123
- v10 release notes for extended stats
- extended statistics - functional dependencies vs. MCV lists
- Additional improvements to extended statistics
- v13: show extended stats target in \d
- Multivariate MCV list vs. statistics target
- PATCH: add support for IN and @> in functional-dependency statistics use
- Using multiple extended statistics for estimates
- BUG #16111: Unexpected query compilation error “negative bitmapset member not allowed”
- Failed assertion clauses != NIL
- Most-common value docs in PG 12
- BF failure: could not open relation with OID XXXX while querying pg_views
- ANALYZE: ERROR: tuple already updated by self
- ANALYZE on parent table results in an error "tuple already updated by self"
- DROP STATISTICS results in "ERROR: tuple concurrently updated"
- SELECT with COLLATE results in segfault on trunk and 12 Beta 2
- [sqlsmith] Crash in mcv_get_match_bitmap
- ERROR: negative bitmapset member not allowed in SELECT
- CREATE STATISTICS documentation bug
- mcvstats serialization code is still shy of a load
- mcv compiler warning
- Choosing values for multivariate MCV lists
- Multivariate MCV stats can leak data to unprivileged users
- O(N^2) when building multi-column MCV lists
- CREATE STATISTICS + Table Inheritance = ERROR: tuple already updated by self
- Mistake in documentation for CREATE STATISTICS
- error messages in extended statistics
- Strange coding in mvdistinct.c
- Multivariate MCV lists -- pg_mcv_list_items() seems to be broken
- Proper usage of ndistinct vs. dependencies extended statistics
- PATCH: multivariate histograms and MCV lists
- BUG #15481: possible not using dependencies statistics when estimate row count for bitmap index scan node
- Multivariate statistics
- stats_ext test fails with -DCATCACHE_FORCE_RELEASE
- STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
- Bitmap scan is undercosted?
- Bogosities in pg_dump's extended statistics support
- PG10.1 autovac killed building extended stats
- Extended statistics is not working on Vars hidden under a RelabelType
- Remove old comments in dependencies.c and README.dependencies
- Fix a typo in README.dependencies
- Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS
- Misnaming of staext_dependencies_load
- CREATE STATISTICS statistic_type documentation
- WITH clause in CREATE STATISTICS