pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc Morin <marc@sandvine.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Trouble managing planner for timestamptz columns
Date: Fri, 10 Mar 2006 18:40:40 -0500
Message-ID: <22202.1142034040@sss.pgh.pa.us> (raw)
In-Reply-To: <2BCEB9A37A4D354AA276774EE13FB8C2BCC473@mailserver.sandvine.com>
References: <2BCEB9A37A4D354AA276774EE13FB8C2BCC473@mailserver.sandvine.com>

"Marc Morin" <marc@sandvine.com> writes:
> Well this analyze just took 12 minutes...  Stats target of 100.
> # time psql xxx xxx -c "analyze elem_trafficstats_1"

Try analyzing just the one column, and try reducing its stats target to
10.  It does make a difference:

sorttest=# set default_statistics_target TO 100;
SET
Time: 0.382 ms
sorttest=# analyze verbose d10;
INFO:  analyzing "public.d10"
INFO:  "d10": scanned 30000 of 833334 pages, containing 3600000 live rows and 0 dead rows; 30000 rows in sample, 100000080 estimated total rows
ANALYZE
Time: 137186.347 ms
sorttest=# set default_statistics_target TO 10;
SET
Time: 0.418 ms
sorttest=# analyze verbose d10(col1);
INFO:  analyzing "public.d10"
INFO:  "d10": scanned 3000 of 833334 pages, containing 360000 live rows and 0 dead rows; 3000 rows in sample, 100000080 estimated total rows
ANALYZE
Time: 17206.018 ms
sorttest=#

			regards, tom lane



view thread (4+ messages)

Message-ID: <22202.1142034040@sss.pgh.pa.us>
Permalink:  ../22202.1142034040@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22202.1142034040@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marc@sandvine.com
  Subject: Re: Trouble managing planner for timestamptz columns
  In-Reply-To: <22202.1142034040@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