pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Ioannis Anagnostopoulos <ioannis@anatec.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: A very long running query....
Date: Sat, 21 Jul 2012 16:02:21 +0800
Message-ID: <500A620D.4030505@ringerc.id.au> (raw)
In-Reply-To: <5009D963.9040005@anatec.com>
References: <5007FC82.9070007@anatec.com>
	<5009CB5A.7070801@anatec.com>
	<CAGTBQpa07PMrLA3qsM9Zf9QXcPvgntyVX7qL9CqEwQtK9LH1hA@mail.gmail.com>
	<5009CD43.8000300@anatec.com>
	<CAFnxYwhbi6NmdNBiguwA6ObHiD=v7ayaVzrGWMZ=qfeTxZiWEA@mail.gmail.com>
	<5009D36A.10506@anatec.com>
	<5009D963.9040005@anatec.com>

On 07/21/2012 06:19 AM, Ioannis Anagnostopoulos wrote:

> On this Ubuntu installation the default_statistics_target = 1000 and 
> not 100. Do you think that this might be an issue?

Nope. You should generally avoid setting default_statistics_target too 
high anyway; leave it where it is and use ALTER TABLE ... ALTER COLUMN 
... SET STATISTICS to raise the targets on columns where you're seeing 
bad statistics estimates.

http://www.postgresql.org/docs/9.1/static/sql-altertable.html

Also make sure autovaccum is running frequently so it keeps the stats up 
to date.

--
Craig Ringer

view thread (21+ messages)  latest in thread

Message-ID: <500A620D.4030505@ringerc.id.au>
Permalink:  ../500A620D.4030505@ringerc.id.au/
Also on:    postgresql.org/message-id/500A620D.4030505@ringerc.id.au

 · 

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: ringerc@ringerc.id.au, ioannis@anatec.com
  Subject: Re: A very long running query....
  In-Reply-To: <500A620D.4030505@ringerc.id.au>

* 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