pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomasz Ostrowski <tometzky+pg@ato.waw.pl>
Cc: Jim Nasby <Jim.Nasby@BlueTreble.com>
Cc: Josh berkus <josh@agliodbs.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [BUGS] Routine analyze of single column prevents standard autoanalyze from running at all
Date: Wed, 08 Jun 2016 10:04:51 -0400
Message-ID: <18350.1465394691@sss.pgh.pa.us> (raw)
In-Reply-To: <3eebdfc2-95dc-9ede-7467-47a3c26b8892@ato.waw.pl>
References: <ef99c1bd-ff60-5f32-2733-c7b504eb960c@ato.waw.pl>
	<28700.1465238280@sss.pgh.pa.us>
	<WM!3b713ccc015c0c47227d1456caf75c57fb15350b789ac43e940c60b7507990cad27fa6afdc0df2c3e2d3afaa80b692c8!@mailstronghold-2.zmailcloud.com>
	<5755DBC2.9040007@agliodbs.com>
	<3d9303dc-f99c-b63c-73be-aa2214bebe73@BlueTreble.com>
	<26771.1465355045@sss.pgh.pa.us>
	<3eebdfc2-95dc-9ede-7467-47a3c26b8892@ato.waw.pl>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Tomasz Ostrowski <tometzky+pg@ato.waw.pl> writes:
> W dniu 2016-06-08 o 05:04, Tom Lane pisze:
>> Yeah, my guess is that the OP's example where analyzing just one column
>> was significantly cheaper boiled down to some of the other columns being
>> mostly toasted data.  Otherwise it's hard to see how there's much more
>> expense in analyzing them all.

> Actually no - this volatile column has smaller "statistics" than most of 
> the table, so analyzing it is much faster when it's data is not in RAM. 

Oh, so you *will* be vulnerable to the side-effect we wondered about
earlier, wherein the manual ANALYZE scans fewer blocks and may therefore
derive a less-accurate tuple count estimate than auto-analyze gets.
It'll be interesting to see how the fix plays out for you --- please pay
attention to whether the pg_stat_all_tables.n_live_tup/n_dead_tup numbers
jump around in unexpected ways.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (8+ messages)

Message-ID: <18350.1465394691@sss.pgh.pa.us>
Permalink:  ../18350.1465394691@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18350.1465394691@sss.pgh.pa.us

 · 

reply

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tometzky+pg@ato.waw.pl, Jim.Nasby@BlueTreble.com, josh@agliodbs.com, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] Routine analyze of single column prevents standard autoanalyze from running at all
  In-Reply-To: <18350.1465394691@sss.pgh.pa.us>
  References: <ef99c1bd-ff60-5f32-2733-c7b504eb960c@ato.waw.pl> <28700.1465238280@sss.pgh.pa.us> <WM!3b713ccc015c0c47227d1456caf75c57fb15350b789ac43e940c60b7507990cad27fa6afdc0df2c3e2d3afaa80b692c8!@mailstronghold-2.zmailcloud.com> <5755DBC2.9040007@agliodbs.com> <3d9303dc-f99c-b63c-73be-aa2214bebe73@BlueTreble.com> <26771.1465355045@sss.pgh.pa.us> <3eebdfc2-95dc-9ede-7467-47a3c26b8892@ato.waw.pl> <18350.1465394691@sss.pgh.pa.us>

* 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