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:
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.
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2008-07-26 05:38:27|
|Subject: Re: Research/Implementation of Nested Loop Join optimization |
|Previous:||From: Tom Lane||Date: 2008-07-26 04:03:28|
|Subject: Re: [RFC] Unsigned integer support. |