Re: unexpected result for wastedbytes query after vacuum full

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: unexpected result for wastedbytes query after vacuum full
Дата
Msg-id CAECtzeX06VQq_rfYx+JiWpvUsoPvw03TqzThG8VYWdnwyn6FZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: unexpected result for wastedbytes query after vacuum full  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-performance
Le mar. 10 déc. 2019 à 20:48, Jeff Janes <jeff.janes@gmail.com> a écrit :
On Tue, Dec 10, 2019 at 11:43 AM Guillaume Lelarge <guillaume@lelarge.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.

В списке pgsql-performance по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Specific query taking time to process
Следующее
От: Fahiz Mohamed
Дата:
Сообщение: Re: Specific query taking time to process