On 22/9/2025 15:37, Frédéric Yhuel wrote:
I wonder if this is an argument in favour of decoupling the sample size
and the precision of the statistics. Here, we basically want the sample
size to be as big as the table in order to include the few (NULL,
WARNING) values.
I also have seen how repeating ANALYZE on the same database drastically
changes query plans ;(.
It seems to me that with massive samples, many of the ANALYZE algorithms
should be rewritten. In principle, statistical hooks exist. So, it is
possible to invent an independent table analyser which will scan the
whole table to get precise statistics.
--
regards, Andrei Lepikhov