On Thu, 15 Aug 2024 at 21:23, Peter Geoghegan <p...@bowt.ie> wrote: > > Attached patch has EXPLAIN ANALYZE display the total number of > primitive index scans for all 3 kinds of index scan node. This is > useful for index scans that happen to use SAOP arrays. It also seems > almost essential to offer this kind of instrumentation for the skip > scan patch [1]. Skip scan works by reusing all of the Postgres 17 work > (see commit 5bf748b8) to skip over irrelevant sections of a composite > index with a low cardinality leading column, so it has all the same > issues.
Did you notice the patch over at [0], where additional diagnostic EXPLAIN output for btrees is being discussed, too? I'm asking, because I'm not very convinced that 'primitive scans' are a useful metric across all (or even: most) index AMs (e.g. BRIN probably never will have a 'primitive scans' metric that differs from the loop count), so maybe this would better be implemented in that framework? Kind regards, Matthias van de Meent Neon (https://neon.tech) [0] https://www.postgresql.org/message-id/flat/TYWPR01MB10982D24AFA7CDC273445BFF0B1DC2%40TYWPR01MB10982.jpnprd01.prod.outlook.com#9c64cf75179da8d657a5eab7c75be480