Skip site navigation (1) Skip section navigation (2)

Re: Shouldn't the planner have a higher cost for reverse index scans?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Shouldn't the planner have a higher cost for reverse index scans?
Date: 2009-04-10 17:07:49
Message-ID: 49DF7CE5.4020404@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
Tom,

>> Now, while index scans (for indexes on disk) aren't 100% sequential
>> reads, it seems like we should be increasing (substantially) the
>> estimated cost of reverse index scans if the index is likely to be on
>> disk.  No?
>
> AFAICS this is already folded into random_page_cost.

Not as far as I can tell.   It looks to me like the planner is assuming 
that a forwards index scan and a reverse index scan will have the same 
cost.

-- 
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

In response to

Responses

pgsql-performance by date

Next:From: Josh BerkusDate: 2009-04-10 17:10:03
Subject: Re: Using IOZone to simulate DB access patterns
Previous:From: Joshua D. DrakeDate: 2009-04-10 16:00:33
Subject: Re: Using IOZone to simulate DB access patterns

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group