pgstattuple: Optimize btree and hash index functions with streaming read
Michael Paquier <michael@paquier.xyz>
pgstattuple: Optimize btree and hash index functions with streaming read This commit replaces the synchronous ReadBufferExtended() loops with the streaming read routines, affecting pgstatindex() (for btree) and pgstathashindex() (for hash indexes). Under test conditions similar to 6c228755add8 (some dm_delay and debug_io_direct=data), this can result in nice runtime and IO gains. Author: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/CABPTF7VrqfbcDXqGrdLQ2xaQ=K0RzExNuw6U_GGqzSJu32wfdQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pgstattuple/pgstatindex.c | modified | +55 −11 |
Discussion
- Streamify more code paths 38 messages · 2025-12-25 → 2026-03-16