From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | Mike Schanne <mschanne(at)kns(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: unexpected result for wastedbytes query after vacuum full |
Date: | 2019-12-11 15:23:05 |
Message-ID: | CAECtzeX06VQq_rfYx+JiWpvUsoPvw03TqzThG8VYWdnwyn6FZQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Le mar. 10 déc. 2019 à 20:48, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> a écrit :
> On Tue, Dec 10, 2019 at 11:43 AM Guillaume Lelarge <guillaume(at)lelarge(dot)info>
> wrote:
>
> This query uses the column statistics to estimate bloat. AFAIK, json
>> columns don't have statistics, so the estimation can't be relied on (for
>> this specific table at least).
>>
>
> This was true prior to 9.5 (for xml at least, I don't know about json),
> but should not be true from that release onward. But still the difference
> between 74440704 and 74506240, this does seem to me to be straining at a
> gnat to swallow a camel.
>
>
I just checked, and you're right. There are less statistics with json, but
the important ones (null_frac and avg_width) are available for json and
jsonb datatypes. So the query should work even for tables using these
datatypes.
Thanks for the information, that's very interesting. And I apologize for
the noise.
--
Guillaume.
From | Date | Subject | |
---|---|---|---|
Next Message | Fahiz Mohamed | 2019-12-11 19:53:57 | Re: Specific query taking time to process |
Previous Message | Justin Pryzby | 2019-12-10 20:42:06 | Re: Specific query taking time to process |