public inbox for [email protected]
help / color / mirror / Atom feedFrom: Frédéric Yhuel <[email protected]>
To: Andrei Lepikhov <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Jehan-Guillaume de Rorthais <[email protected]>
Cc: Christophe Courtois <[email protected]>
Cc: Laurenz Albe <[email protected]>
Subject: Re: Indexes on expressions with multiple columns and operators
Date: Mon, 22 Sep 2025 18:09:05 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 9/22/25 15:57, Andrei Lepikhov wrote:
> 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.
>
Interesting! I wonder how difficult it would be.
However, in this specific case, I realised that it wouldn't solve the
issue of ANALYZE being triggered when there are zero rows with (ackid,
crit) = (NULL, WARNING).
Partitioning would still work in this case, though, because ackid's
null_frac would be zero for the partition containing the 'WARNING' value.
I wonder if we could devise another kind of extended statistic that
would provide these "partitioned statistics" without actually partitioning.
view thread (26+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Indexes on expressions with multiple columns and operators
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox