Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)

From: Andrew Sagulin <andrews42(at)yandex(dot)ru>
To: pgsql-performance(at)postgresql(dot)org
Subject: Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)
Date: 2006-06-28 09:33:55
Message-ID: 624168784.20060628133355@yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Wednesday, June 28, 2006, 2:04:17 Simon Riggs, you wrote:

> That part is sensible. The min_IO_cost is when the access is sequential,
> which by definition has a cost of 1.0.

In general - yes. But we talk about the min_IO_cost of the index scan which is
barely sequential. Correct me if I'm wrong: index scan algorithm is something
like this: 'read couple of index pages, read some data pages, index pages, data
pages, ...'. So, the current assumption of min_IO_cost is too optimistic even in
a case of ideal tuple ordering.

> The bit you might have issue with is how we extrapolate from the
> min_IO_cost and correlation to arrive at a cost.

Now index scan cost calculation use indexCorrelation as measure of a tuple
clustering and a degree of their sequentiality (physical ordering). As far
as I know there are cases when this approach is wrong, for example, my issue or
any other case with high clustering without ordering, where bitmap heap scan is
the best way but PostgreSQL prefer index scan or even sequential scan.

Does PostgreSQL's development team plan to revise the index scan
cost algorithm or issues like mine is too rare for taking into account?

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-06-28 14:37:24 Re: Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)
Previous Message Simon Riggs 2006-06-27 22:04:17 Re: Large index scan perfomance and indexCorrelation (PG