回复:Re: Regarding the necessity of RelationGetNumberOfBlocks for every rescan / bitmap heap scan.

2021-05-30 Thread 陈佳昕(步真)
+1, This would be an nice improvement even the lseek is fast usually, it is a system call after all Buzhen-- 发件人:Andy Fan 日 期:2021年05月31日 13:46:22 收件人:PostgreSQL Hackers 主 题:Re: Regarding the necessity of RelationGetNumberOfBlocks

Re: Regarding the necessity of RelationGetNumberOfBlocks for every rescan / bitmap heap scan.

2021-05-30 Thread Andy Fan
On Sat, May 29, 2021 at 11:23 AM Andy Fan wrote: > Hi: > > I'm always confused about the following codes. > > static void > initscan(HeapScanDesc scan, ScanKey key, bool keep_startblock) > { > ParallelBlockTableScanDesc bpscan = NULL; > bool allow_strat; > bool allow_sync; > > /* > * Determine

Re: Regarding the necessity of RelationGetNumberOfBlocks for every rescan / bitmap heap scan.

2021-05-29 Thread Andy Fan
> 1. Why do we need scan->rs_nblocks = >RelationGextNumberOfBlocks(scan->rs_base.rs_rd) for every rescan, which > looks >mismatched with the comments along the code. and the comments looks >reasonable to me. > 2. For the heap scan after an IndexScan, we don't need to know the heap >

Regarding the necessity of RelationGetNumberOfBlocks for every rescan / bitmap heap scan.

2021-05-28 Thread Andy Fan
Hi: I'm always confused about the following codes. static void initscan(HeapScanDesc scan, ScanKey key, bool keep_startblock) { ParallelBlockTableScanDesc bpscan = NULL; bool allow_strat; bool allow_sync; /* * Determine the number of blocks we have to scan. * * It is sufficient to do this once