Re: index prefetching - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: index prefetching
Date
Msg-id 3a5f09ad-d588-4a5c-9ea5-8dfddbdae3a1@vondra.me
Whole thread Raw
In response to Re: index prefetching  (Tomas Vondra <tomas@vondra.me>)
List pgsql-hackers

On 8/25/25 16:18, Tomas Vondra wrote:
> ...
> 
> But with more hits, the hit/miss ratio simply determines the "stable"
> distance. Let's say there's 80% hits, so 4 hits to 1 miss. Then the
> stable distance is ~4, because we get a miss, double to 8, and then 4
> hits, so the distance drops back to 4. And again.
> 

I forgot to mention the distance is "stable" only if you already start
at it - then we keep it. But start at a higher value, and the distance
keeps growing. Or start at a lower value, and it collapses to 1. Plus
it's rather sensitive, a minor variation can easily push the distance in
either direction.

So it's more like an "unstable equilibrium" in physics.

regards

-- 
Tomas Vondra




pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: use PqMsg macros in fe-protocol3.c
Next
From: Antonin Houska
Date:
Subject: Re: Adding REPACK [concurrently]