Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Dean Rasheed <dean.a.rasheed@gmail.com>
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
Andres Freund <andres@anarazel.de>, Thomas Munro <thomas.munro@enterprisedb.com>,
Mark Dilger <hornschnorter@gmail.com>, Adrien Nayrat <adrien.nayrat@dalibo.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-03-26T16:21:06Z
Lists: pgsql-hackers
On 26 March 2018 at 14:08, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote: > On 03/26/2018 12:31 PM, Dean Rasheed wrote: >> A wider concern I have is that I think this function is trying to be >> too clever by only resetting selected stats. IMO it should just reset >> all stats unconditionally when the column type changes, which would >> be consistent with what we do for regular stats. >> > The argument a year ago was that it's more plausible that the semantics > remains the same. I think the question is how the type change affects > precision - had the type change in the opposite direction (int to real) > there would be no problem, because both ndistinct and dependencies would > produce the same statistics. > > In my experience people are far more likely to change data types in a > way that preserves precision, so I think the current behavior is OK. Hmm, I don't really buy that argument. Altering a column's type allows the data in it to be rewritten in arbitrary ways, and I don't think we should presume that the statistics will still be valid just because the user *probably* won't do something that changes the data much. Regards, Dean
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