Re: Slow query performance on large table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Paul McKay <paul_mckay(at)clearwater-it(dot)co(dot)uk>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow query performance on large table
Date: 2003-03-04 17:20:26
Message-ID: 25725.1046798426@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> Maybe it's just me, but I get the feeling you need to work some regular
> reindexing into your maintenance schedule.

Or at least, more vacuuming...

> Given your query is using
> between, I don't think it would use the index on the time field anyway
> (and explain analyze seems to be supporting this). Rewrite it so that
> you have a and time > foo and time < bar and I think you'll see a
> difference.

No, you won't, because that's exactly what BETWEEN is.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tomasz Myrta 2003-03-04 17:20:57 Re: Slow query performance on large table
Previous Message Paul McKay 2003-03-04 17:19:03 Re: Slow query performance on large table