pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Wilson <david.t.wilson@gmail.com>
To: Justin <justin@emproshunts.com>
Cc: mark <markkicks@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: select query takes 13 seconds to run with index
Date: Mon, 26 May 2008 20:09:30 -0400
Message-ID: <e7f9235d0805261709k638dbb23jef43b8fe62861fc7@mail.gmail.com> (raw)
In-Reply-To: <483B4729.7050402@emproshunts.com>
References: <82fa9e310805261549m2362fbe8sbf18789938fee833@mail.gmail.com>
	<483B4729.7050402@emproshunts.com>

On Mon, May 26, 2008 at 7:26 PM, Justin <justin@emproshunts.com> wrote:
> The estimate is way off, when was the last time Vaccum was on the table?

I'm going to second this- run "ANALYZE pokes;" and then test the query
again; I'll bet you'll get much better results.

It's not the VACUUM that matters so much as the ANALYZE, and it
definitely needs to be done on occasion if you're adding a lot of
records. Do you have the autovacuum daemon running? (And if not, why
not?)


-- 
- David T. Wilson
david.t.wilson@gmail.com



view thread (16+ messages)  latest in thread

Message-ID: <e7f9235d0805261709k638dbb23jef43b8fe62861fc7@mail.gmail.com>
Permalink:  ../e7f9235d0805261709k638dbb23jef43b8fe62861fc7@mail.gmail.com/
Also on:    postgresql.org/message-id/e7f9235d0805261709k638dbb23jef43b8fe62861fc7@mail.gmail.com

 · 

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: david.t.wilson@gmail.com, justin@emproshunts.com, markkicks@gmail.com, pgsql-general@postgresql.org
  Subject: Re: select query takes 13 seconds to run with index
  In-Reply-To: <e7f9235d0805261709k638dbb23jef43b8fe62861fc7@mail.gmail.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