Skip site navigation (1) Skip section navigation (2)

Re: A very long running query....

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Ioannis Anagnostopoulos <ioannis(at)anatec(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: A very long running query....
Date: 2012-07-21 08:02:21
Message-ID: 500A620D.4030505@ringerc.id.au (view raw or flat)
Thread:
Lists: pgsql-novicepgsql-performance
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


In response to

pgsql-novice by date

Next:From: Marc MaminDate: 2012-07-21 09:16:16
Subject: Re: A very long running query....
Previous:From: Ioannis AnagnostopoulosDate: 2012-07-20 23:56:34
Subject: Re: A very long running query....

pgsql-performance by date

Next:From: Craig RingerDate: 2012-07-21 08:30:44
Subject: Re: query overhead
Previous:From: Ioannis AnagnostopoulosDate: 2012-07-20 23:56:34
Subject: Re: A very long running query....

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group