Re: Planner doesn't take indexes into account

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Grzegorz Olszewski <grzegorz(dot)olszewski(at)outlook(dot)com>, AI Rumman <rummandba(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Planner doesn't take indexes into account
Date: 2014-05-28 10:22:43
Message-ID: 5385B8F3.2000103@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Shaun Thomas 2014-05-28 13:31:38 Re: Planner doesn't take indexes into account
Previous Message Grzegorz Olszewski 2014-05-28 09:59:50 Re: Planner doesn't take indexes into account