On Thu, Feb 26, 2026 at 6:46 PM Ilia Evdokimov <[email protected]> wrote: > While reviewing the patch more closely, I noticed > that compute_distinct_stats() is only used for types where we have =, != > but not <. In practice, most common scalar types go through > compute_scalar_stats() instead. > > That makes me wonder how often this optimization would actually trigger > in real workloads. Since compute_scalar_stats() is the more common path, > there's chance that the hash-table based improvement in > compute_distinct_stats() may not provide a noticeable overall benefit.
Coming back to this point, in any installation, the common path is going to vastly outnumber the rare path, so this patch is optimizing the wrong thing. -- John Naylor Amazon Web Services
