Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Mark Dilger <hornschnorter@gmail.com>
From: Mark Dilger <hornschnorter@gmail.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Adrien Nayrat <adrien.nayrat@dalibo.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-11-25T17:14:18Z
Lists: pgsql-hackers
> On Nov 18, 2017, at 12:28 PM, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote: > > Hi, > > Attached is an updated version of the patch, adopting the psql describe > changes introduced by 471d55859c11b. > > regards > > -- > Tomas Vondra http://www.2ndQuadrant.com > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services > <0001-multivariate-MCV-lists.patch.gz><0002-multivariate-histograms.patch.gz> Hello Tomas, In 0002-multivariate-histograms.patch, src/include/nodes/relation.h, struct StatisticExtInfo, you change: - char kind; /* statistic kind of this entry */ + int kinds; /* statistic kinds of this entry */ to have 'kinds' apparently be a bitmask, based on reading how you use this in the code. The #defines just below the struct give the four bits to be used, #define STATS_EXT_INFO_NDISTINCT 1 #define STATS_EXT_INFO_DEPENDENCIES 2 #define STATS_EXT_INFO_MCV 4 #define STATS_EXT_INFO_HISTOGRAM 8 except that nothing in the file indicates that this is so. Perhaps a comment could be added here mentioning that 'kinds' is a bitmask, and that these #defines are related? mark
Commits
-
Convert pre-existing stats_ext tests to new style
- dbb984128ebf 12.0 landed
-
Add support for multivariate MCV lists
- 7300a699502f 12.0 landed
-
Improve ANALYZE's strategy for finding MCVs.
- b5db1d93d2a6 11.0 cited
-
Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)
- 5564c1181548 11.0 cited
-
Try again to fix accumulation of parallel worker instrumentation.
- 8526bcb2df76 11.0 cited
-
Adjust psql \d query to avoid use of @> operator.
- 471d55859c11 11.0 cited
-
Message style fixes
- 821fb8cdbf70 11.0 cited
-
Add security checks to selectivity estimation functions
- e2d4ef8de869 10.0 cited