Re: initscan for MVCC snapshot

2020-12-10 Thread Andy Fan
On Thu, Dec 10, 2020 at 7:31 PM Andy Fan wrote: > > > On Mon, Dec 7, 2020 at 8:26 PM Andy Fan wrote: > >> Hi: >> I see initscan calls RelationGetwNumberOfBlocks every time and rescan >> calls >> initscan as well. In my system, RelationGetNumberOfBlocks is expensive >> (the reason >> doesn't d

Re: initscan for MVCC snapshot

2020-12-10 Thread Andy Fan
On Mon, Dec 7, 2020 at 8:26 PM Andy Fan wrote: > Hi: > I see initscan calls RelationGetwNumberOfBlocks every time and rescan > calls > initscan as well. In my system, RelationGetNumberOfBlocks is expensive > (the reason > doesn't deserve a talk.. ), so in a nest loop + Bitmap heap scan case,

initscan for MVCC snapshot

2020-12-07 Thread Andy Fan
Hi: I see initscan calls RelationGetwNumberOfBlocks every time and rescan calls initscan as well. In my system, RelationGetNumberOfBlocks is expensive (the reason doesn't deserve a talk.. ), so in a nest loop + Bitmap heap scan case, the impact will be huge. The comments of initscan are below.