mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Minor improvements for the multivariate MCV lists
The MCV build should always call get_mincount_for_mcv_list(), as the
there is no other logic to decide whether the MCV list represents all
the data. So just remove the (ngroups > nitems) condition.
Also, when building MCV lists, the number of items was limited by the
statistics target (i.e. up to 10000). But when deserializing the MCV
list, a different value (8192) was used to check the input, causing
an error. Simply ensure that the same value is used in both places.
This should have been included in 7300a69950
, but I forgot to include it
in that commit.
This commit is contained in:
@@ -82,8 +82,8 @@ typedef struct MVDependencies
|
||||
#define STATS_MCV_MAGIC 0xE1A651C2 /* marks serialized bytea */
|
||||
#define STATS_MCV_TYPE_BASIC 1 /* basic MCV list type */
|
||||
|
||||
/* max items in MCV list (mostly arbitrary number) */
|
||||
#define STATS_MCVLIST_MAX_ITEMS 8192
|
||||
/* max items in MCV list (should be equal to max default_statistics_target) */
|
||||
#define STATS_MCVLIST_MAX_ITEMS 10000
|
||||
|
||||
/*
|
||||
* Multivariate MCV (most-common value) lists
|
||||
|
Reference in New Issue
Block a user