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

Re: [PERFORM] select query takes 13 seconds to run with index

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: mark <markkicks(at)gmail(dot)com>
Cc: Justin <justin(at)emproshunts(dot)com>, pgsql-general(at)postgresql(dot)org,pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] select query takes 13 seconds to run with index
Date: 2008-05-27 08:22:01
Message-ID: 20080527082201.GA17943@depesz.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-performance
On Mon, May 26, 2008 at 04:32:50PM -0700, mark wrote:
> >> EXPLAIN ANALYZE select * from pokes where uid = 578439028 order by id
> >> DESC limit 6;
> > The estimate is way off, when was the last time Vaccum was on the table?
> about a week ago i ran this VACUUM VERBOSE ANALYZE;
> this table is never updated or deleted, rows are just inserted...

1. boost default_statistics_target
2. run analyze more often - daily job for example
3. create index q on pokes (uid, id); should help

depesz

In response to

Responses

pgsql-performance by date

Next:From: markDate: 2008-05-27 14:46:05
Subject: Re: [GENERAL] select query takes 13 seconds to run with index
Previous:From: PFCDate: 2008-05-27 08:19:37
Subject: Re: [PERFORM] select query takes 13 seconds to run with index

pgsql-general by date

Next:From: Magnus HaganderDate: 2008-05-27 08:35:16
Subject: Re: statistics collector process is thrashing my cpu
Previous:From: PFCDate: 2008-05-27 08:19:37
Subject: Re: [PERFORM] select query takes 13 seconds to run with index

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