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

Re: Research/Implementation of Nested Loop Join optimization

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Manoel Henrique <mhenriquesgbd(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Research/Implementation of Nested Loop Join optimization
Date: 2008-07-26 05:27:58
Message-ID: 488AB5DE.8070100@cheapcomplexdevices.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>> "Manoel Henrique" <mhenriquesgbd(at)gmail(dot)com> writes:
>>> Yes, I'm relying on the assumption that backwards scan has the same cost as
>>> forward scan, why shouldn't it?
> 
> G...we expect that forward scans will result
> in the kernel doing read-ahead, ...
> A backwards scan will get no such overlapping and thus be up to 2X
> slower, unless the kernel is smart enough to do read-ahead for
> descending-order read requests.  Which seems not too probable. 

Linux's old adaptive readahead patches claimed to[1]:
   It also have methods to detect some less common cases:
   - reading backward"
Interestingly the author of that patch used postgres as the example
application that benefits from the patch (30%).

I'm not sure if the backward reading feature got kept
in the simplified on-demand readahead that seems to have
superseded the adaptive readahead stuff in 2.6.23[2].

[1] http://lwn.net/Articles/185469/
[2] http://kernelnewbies.org/Linux_2_6_23#head-102af265937262a7a21766ae58fddc1a29a5d8d7


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-07-26 05:38:27
Subject: Re: Research/Implementation of Nested Loop Join optimization
Previous:From: Tom LaneDate: 2008-07-26 04:03:28
Subject: Re: [RFC] Unsigned integer support.

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