Re: Planner doesn't take indexes into account - Mailing list pgsql-performance

From Heikki Linnakangas
Subject Re: Planner doesn't take indexes into account
Date
Msg-id 5385B8F3.2000103@vmware.com
Whole thread Raw
In response to Re: Planner doesn't take indexes into account  (Grzegorz Olszewski <grzegorz.olszewski@outlook.com>)
List pgsql-performance
On 05/28/2014 12:59 PM, Grzegorz Olszewski wrote:
> random_page_cost = 4.0
> seq_page_cost = 1.0
>
> There is about 500,000 rows and about 500 new rows each business day.
>
> About 96% of rows meet given conditions, that is, count shoud be about 480,000.

When such a large percentage of the rows match, a sequential scan is
indeed a better plan than an index scan. Sequential access is much
faster than random access.

- Heikki


pgsql-performance by date:

Previous
From: Grzegorz Olszewski
Date:
Subject: Re: Planner doesn't take indexes into account
Next
From: Shaun Thomas
Date:
Subject: Re: Planner doesn't take indexes into account