Re: Tuning threshold for BAS_BULKREAD (large tables) - Mailing list pgsql-general

From Ron
Subject Re: Tuning threshold for BAS_BULKREAD (large tables)
Date
Msg-id 4154037a-50e1-7fbf-9521-3589ec975f42@gmail.com
Whole thread Raw
In response to Tuning threshold for BAS_BULKREAD (large tables)  ("Jamison, Kirk" <k.jamison@jp.fujitsu.com>)
Responses RE: Tuning threshold for BAS_BULKREAD (large tables)  ("Jamison, Kirk" <k.jamison@jp.fujitsu.com>)
List pgsql-general
On 1/22/19 1:35 AM, Jamison, Kirk wrote:

Hi,

 

I have a source code-related question on BufferAccessStrategyType BAS_BULKREAD.

Currently, this access method is set internally to cache tables larger than 1/4 of shared_buffers.

src/backend/access/heap/heapam.c:initscan()

     if (!RelationUsesLocalBuffers(scan->rs_rd) &&

         scan->rs_nblocks > NBuffers / 4)

        ...

         /* During a rescan, keep the previous strategy object. */

         if (scan->rs_strategy == NULL)

             scan->rs_strategy = GetAccessStrategy(BAS_BULKREAD);

 

Users can tune their shared_buffers size, but not able to tune this component.

I'm just wondering how it affects the current workload when the table size is larger than the database.


How can a subset of the database be larger than the database?


--
Angular momentum makes the world go 'round.

pgsql-general by date:

Previous
From: "Jamison, Kirk"
Date:
Subject: Tuning threshold for BAS_BULKREAD (large tables)
Next
From: "Jamison, Kirk"
Date:
Subject: RE: Tuning threshold for BAS_BULKREAD (large tables)