From: Steinar H. Gunderson
Subject: Re: index usage
Date: ,
Msg-id: 20070423175811.GA10915@uio.no
(view: Whole thread, Raw)
In response to: index usage  ("Arkadiusz Raj")
List: 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/


pgsql-performance by date:

From: Mark Kirkwood
Date:
Subject: Re: postgres: 100% CPU utilization
From: Greg Smith
Date:
Subject: Re: TPC-H Scaling Factors X PostgreSQL Cluster Command