Re: Page Scan Mode in Hash Index
Jesper Pedersen <jesper.pedersen@redhat.com>
From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-03-23T14:59:59Z
Lists: pgsql-hackers
Hi, On 03/22/2017 09:32 AM, Ashutosh Sharma wrote: > Done. Please refer to the attached v2 version of patch. > Thanks. >>> 1) 0001-Rewrite-hash-index-scans-to-work-a-page-at-a-time.patch: this >>> patch rewrites the hash index scan module to work in page-at-a-time >>> mode. It basically introduces two new functions-- _hash_readpage() and >>> _hash_saveitem(). The former is used to load all the qualifying tuples >>> from a target bucket or overflow page into an items array. The latter >>> one is used by _hash_readpage to save all the qualifying tuples found >>> in a page into an items array. Apart from that, this patch bascially >>> cleans _hash_first(), _hash_next and hashgettuple(). >>> 0001v2: In hashgettuple() you can remove the 'currItem' and 'offnum' from the 'else' part, and do the assignment inside if (so->numKilled < MaxIndexTuplesPerPage) instead. No new comments for 0002 and 0003. Best regards, Jesper
Commits
-
Remove lsn from HashScanPosData.
- 22c5e73562c5 11.0 landed
-
Fix trivial mistake in README.
- 79a4a665c046 11.0 landed
-
hash: Implement page-at-a-time scan.
- 7c75ef571579 11.0 landed
-
Reduce pinning and buffer content locking for btree scans.
- 2ed5b87f96d4 9.5.0 cited