Multivariate MCV list vs. statistics target - Mailing list pgsql-hackers

From Tomas Vondra
Subject Multivariate MCV list vs. statistics target
Date
Msg-id 20190618213357.vli3i23vpkset2xd@development
Whole thread Raw
Responses Re: Multivariate MCV list vs. statistics target
List pgsql-hackers
Hi,

One slightly inconvenient thing I realized while playing with the
address data set is that it's somewhat difficult to set the desired size
of the multi-column MCV list.

At the moment, we simply use the maximum statistic target for attributes
the MCV list is built on. But that does not allow keeping default size
for per-column stats, and only increase size of multi-column MCV lists.

So I'm thinking we should allow tweaking the statistics for extended
stats, and serialize it in the pg_statistic_ext catalog. Any opinions
why that would be a bad idea?

I suppose it should be part of the CREATE STATISTICS command, but I'm
not sure what'd be the best syntax. We might also have something more
similar to ALTER COLUMNT, but perhaps

     ALTER STATISTICS s SET STATISTICS 1000;

looks a bit too weird.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: New EXPLAIN option: ALL
Next
From: Tomas Vondra
Date:
Subject: O(N^2) when building multi-column MCV lists