Re: pg_stats and range statistics - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: pg_stats and range statistics
Date
Msg-id cca33c94-f3ea-3200-9195-ac923485d498@enterprisedb.com
Whole thread Raw
In response to Re: pg_stats and range statistics  (Egor Rogov <e.rogov@postgrespro.ru>)
Responses Re: pg_stats and range statistics
List pgsql-hackers
Hi Egor,

While reviewing a patch improving join estimates for ranges [1] I
realized we don't show stats for ranges in pg_stats, and I recalled we
had this patch.

I rebased the v2, and I decided to took a stab at showing separate
histograms for lower/upper histogram bounds. I believe it makes it way
more readable, which is what pg_stats is about IMHO.

This simply adds two functions, accepting/producing anyarray - one for
lower bounds, one for upper bounds. I don't think it can be done with a
plain subquery (or at least I don't know how).

Finally, it renames the empty_range_frac to start with range_, per the
earlier discussion. I wonder if the new column names for lower/upper
bounds (range_lower_bounds_histograms/range_upper_bounds_histograms) are
too long ...

regards

[1] https://commitfest.postgresql.org/41/3821/

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: almost-super-user problems that we haven't fixed yet
Next
From: Merlin Moncure
Date:
Subject: feature request: IN clause optimized through append nodes with UNION ALL