pg_stats avg_width and null_frac

From: Paul McGarry <paul(at)paulmcgarry(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: pg_stats avg_width and null_frac
Date: 2018-06-06 00:49:28
Message-ID: CAPrE0SZmSSH+6PPRW20Nyz9Cf9Fkx5xUM2gr5GB7-3kL6hvo6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can anyone confirm that the "avg_width" reported in the pg_stats is the
avg_width not including any null rows?

ie if a field had:

avg_width: 6
null_frac: 0.5

Then
- 50% of the rows would be empty for this field
- The other 50% of the rows would have data with an avg_width of 6 bytes?
(according to the sampled data at least)

Paul

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-06-06 01:04:39 Re: pg_stats avg_width and null_frac
Previous Message Tom Lane 2018-06-06 00:38:41 Re: Code of Conduct plan