Re: Metadata and record block access stats for indexes

2025-07-22 Thread Mircea Cadariu
Hi Frédéric, Thanks a lot for trying out my (first) patch! Much appreciated. On 20/07/2025 21:54, Frédéric Yhuel wrote: Your patch applies cleanly and seems to work well. Cool! because most of the index non-leaf pages should be in the cache. Right? Yes indeed, it's an assumption in the

Re: Metadata and record block access stats for indexes

2025-07-20 Thread Frédéric Yhuel
On 7/4/25 18:00, Mircea Cadariu wrote: Just attaching v2 of the patch. Hi Mircea, Your patch applies cleanly and seems to work well. IIUC, the index hit ratio should be computed with the following formula: (idx_blks_hit - idx_metadata_blks) / (idx_blks_hit - idx_metadata_blks + idx_blks_

Re: Metadata and record block access stats for indexes

2025-07-04 Thread Mircea Cadariu
Hi, Just attaching v2 of the patch.  It’s a trimmed down version compared to what I started with.  For context, this is the original discussion on which this work is based on: https://www.postgresql.org/message-id/flat/CAH2-WzmdZqxCS1widYzjDAM%2BZ-Jz%3DejJoaWXDVw9Qy1UsK0tLA%40mail.gmail.com

Metadata and record block access stats for indexes

2025-02-28 Thread Mircea Cadariu
Hi, For the purpose of writing a blog post I was checking the index stats recorded for a workload, but found them rather confusing. Following along the code with the debugger it eventually made sense, and I could eventually understand what's counted.  Looking around a bit, I discovered an old