From: | "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com> |
---|---|
To: | Arkadiusz Raj <arek(at)raj(dot)priv(dot)pl> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: index usage |
Date: | 2007-04-23 17:58:11 |
Message-ID: | 20070423175811.GA10915@uio.no |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Mon, Apr 23, 2007 at 07:20:29PM +0200, Arkadiusz Raj wrote:
> I have a table in my database that is updated every minute with new acquired
> data. Anyway there is a query to get latest values to be displayed on
> screen. I have postgresql 7.4.2 that work very fine.
You want _at least_ the latest 7.4 version -- ideally, the latest 8.2
version.
> The problem was that
> after hdd crash I have rebuild database from the archive and... Execution
> time of this query starts to be unacceptable.
Have you re-ANALYZEd after the data load?
Anyhow, the issue with the planner not knowing how to estimate expressions
like "now() - interval '5 minutes'" correctly is a known 7.4 issue, and it's
fixed in later versions. It might have worked more or less by accident
earlier, although it seems odd that it wouldn't even have considered the
index scan...
/* Steinar */
--
Homepage: http://www.sesse.net/
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2007-04-23 18:26:07 | Re: TPC-H Scaling Factors X PostgreSQL Cluster Command |
Previous Message | C Storm | 2007-04-23 17:49:31 | Re: index structure for 114-dimension vector |