From: hubert depesz lubaczewski <depesz@depesz.com>
To: mark <markkicks@gmail.com>
Cc: Justin <justin@emproshunts.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] select query takes 13 seconds to run with index
Date: Tue, 27 May 2008 10:22:01 +0200
Message-ID: <20080527082201.GA17943@depesz.com> (raw)
In-Reply-To: <82fa9e310805261632y46f306fdh84e2da62ffbd7873@mail.gmail.com>
References: <82fa9e310805261549m2362fbe8sbf18789938fee833@mail.gmail.com>
<483B4729.7050402@emproshunts.com>
<82fa9e310805261632y46f306fdh84e2da62ffbd7873@mail.gmail.com>
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
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: depesz@depesz.com, markkicks@gmail.com, justin@emproshunts.com, pgsql-general@postgresql.org
Subject: Re: [PERFORM] select query takes 13 seconds to run with index
In-Reply-To: <20080527082201.GA17943@depesz.com>
* 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