| From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
|---|---|
| To: | Sami Imseih <samimseih(dot)pg(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tomas Vondra <tomas(at)vondra(dot)me> |
| Subject: | Re: Showing "Table Block Fetches" in EXPLAIN ANALYZE for index-only scans |
| Date: | 2026-11-23 15:38:45 |
| Message-ID: | CAH2-WznqWKz6Jf=dXN3GfS4N_153AMaMCSkgqpcr-CCKD_Lu7Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Oct 15, 2026 at 6:04 PM Sami Imseih <samimseih(dot)pg(at)gmail(dot)com> wrote:
> I did not look too much into the patch details, but I do think this is a
> good idea. For example, there can be a real cost difference between checking
> visibility for 20 table tuples spread across 20 table blocks and checking
> visibility for 20 table tuples packed onto 1 table block. So having such
> additional information seems valuable.
Right.
> Exposing this in pg_stat_*_indexes would also make sense.
Let's leave that for another patch.
> I think we should keep the equivalent of "Heap Fetches", although I do
> think the name itself has always seemed too vague. It is easy to read it
> as blocks, or as rows returned, when it is really counting table tuple
> visibility checks. "Table Tuple Fetches" would be clear along with the one
> you're proposing.
Attached v2 shows both rows/tuples and blocks on a single line, as
"Table Fetches: rows=N blocks=N" for text format EXPLAIN. For the
non-text formats, we show separate "Table Row Fetches" and "Table
Block Fetches" fields.
--
Peter Geoghegan
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-EXPLAIN-ANALYZE-Show-index-only-scan-block-fetche.patch | application/octet-stream | 23.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ayoub Kazar | 2026-11-23 15:47:06 | Re: [PROPOSAL] Expand OR clauses in joins to UNION ALL paths |
| Previous Message | Ilia Evdokimov | 2026-11-23 15:20:23 | Re: Show 'Rows Removed by Filter' with two fractional digits in EXPLAIN |