From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: ALTER TABLE .. SET STATISTICS
Date: Sun, 5 Aug 2018 10:43:29 -0400
Message-ID: <20180805144329.kjctch4yb42j37i4@alvherre.pgsql> (raw)
In-Reply-To: <45407d90-85dc-f5ba-58a5-d07fe99e852a@gmail.com>
On 2018-Aug-05, Ron wrote:
> For columns of type bytea which store image data (PDFs, JPGs, etc) would it
> speed up the ANALYZE process to SET STATISTICS = 0?
Yes. I'd suggest also looking at ALTER TABLE ... SET STORAGE to avoid
having Postgres try to compress those columns, which is useless waste of
CPU cycles, since those formats already compress.
> That way, default_statistics_target could be cranked higher -- giving better
> statistics for needed columns -- without polluting pg_statistics with
> unneeded data?
Right.
With the default being 100 I don't think there's a real need to crank it
higher server-wide, but it may be useful to crank it higher for specific
columns.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@2ndquadrant.com, ronljohnsonjr@gmail.com
Subject: Re: ALTER TABLE .. SET STATISTICS
In-Reply-To: <20180805144329.kjctch4yb42j37i4@alvherre.pgsql>
References: <45407d90-85dc-f5ba-58a5-d07fe99e852a@gmail.com> <20180805144329.kjctch4yb42j37i4@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox