pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedALTER TABLE .. SET STATISTICS
3+ messages / 3 participants
[nested] [flat]
* ALTER TABLE .. SET STATISTICS
@ 2018-08-05 06:03 Ron <ronljohnsonjr@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Ron @ 2018-08-05 06:03 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
v9.6.9
For columns of type bytea which store image data (PDFs, JPGs, etc) would it
speed up the ANALYZE process to SET STATISTICS = 0?
That way, default_statistics_target could be cranked higher -- giving better
statistics for needed columns -- without polluting pg_statistics with
unneeded data?
Thanks
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ALTER TABLE .. SET STATISTICS
@ 2018-08-05 14:43 Alvaro Herrera <alvherre@2ndquadrant.com>
parent: Ron <ronljohnsonjr@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Alvaro Herrera @ 2018-08-05 14:43 UTC (permalink / raw)
To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ALTER TABLE .. SET STATISTICS
@ 2018-08-05 15:43 Tom Lane <tgl@sss.pgh.pa.us>
parent: Ron <ronljohnsonjr@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2018-08-05 15:43 UTC (permalink / raw)
To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
Ron <ronljohnsonjr@gmail.com> writes:
> For columns of type bytea which store image data (PDFs, JPGs, etc) would it
> speed up the ANALYZE process to SET STATISTICS = 0?
Should do, though I'm not sure how much of an effect you'd see.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-08-05 15:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-05 06:03 ALTER TABLE .. SET STATISTICS Ron <ronljohnsonjr@gmail.com>
2018-08-05 14:43 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2018-08-05 15:43 ` Tom Lane <tgl@sss.pgh.pa.us>
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