Re: index usage

Поиск
Список
Период
Сортировка
От Steinar H. Gunderson
Тема Re: index usage
Дата
Msg-id 20070423175811.GA10915@uio.no
обсуждение исходный текст
Ответ на index usage  ("Arkadiusz Raj" <arek@raj.priv.pl>)
Список 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 по дате отправления:

Предыдущее
От: "Arkadiusz Raj"
Дата:
Сообщение: index usage
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: TPC-H Scaling Factors X PostgreSQL Cluster Command