mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Display length and bounds histograms in pg_stats
Values corresponding to STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM and
STATISTIC_KIND_BOUNDS_HISTOGRAM were not exposed to pg_stats when these
slot kinds were introduced in 918eee0c49
.
This commit adds the missing fields to pg_stats.
Catversion is bumped.
Discussion: https://postgr.es/m/flat/b67d8b57-9357-7e82-a2e7-f6ce6eaeec67@postgrespro.ru
Author: Egor Rogov, Soumyadeep Chakraborty
Reviewed-by: Tomas Vondra, Justin Pryzby, Jian He
This commit is contained in:
@ -3799,6 +3799,45 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
|
||||
non-null elements. (Null for scalar types.)
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="catalog_table_entry"><para role="column_definition">
|
||||
<structfield>range_length_histogram</structfield> <type>anyarray</type>
|
||||
</para>
|
||||
<para>
|
||||
A histogram of the lengths of non-empty and non-null range values of a
|
||||
range type column. (Null for non-range types.)
|
||||
</para>
|
||||
<para>
|
||||
This histogram is calculated using the <literal>subtype_diff</literal>
|
||||
range function regardless of whether range bounds are inclusive.
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="catalog_table_entry"><para role="column_definition">
|
||||
<structfield>range_empty_frac</structfield> <type>float4</type>
|
||||
</para>
|
||||
<para>
|
||||
Fraction of column entries whose values are empty ranges.
|
||||
(Null for non-range types.)
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="catalog_table_entry"><para role="column_definition">
|
||||
<structfield>range_bounds_histogram</structfield> <type>anyarray</type>
|
||||
</para>
|
||||
<para>
|
||||
A histogram of lower and upper bounds of non-empty and non-null range
|
||||
values. (Null for non-range types.)
|
||||
</para>
|
||||
<para>
|
||||
These two histograms are represented as a single array of ranges, whose
|
||||
lower bounds represent the histogram of lower bounds, and upper bounds
|
||||
represent the histogram of upper bounds.
|
||||
</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user