Re: Show estimated number of groups for IncrementalSort in EXPLAIN

From: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
To: Enrique Sánchez <enriqueesanchz(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Show estimated number of groups for IncrementalSort in EXPLAIN
Date: 2026-06-17 10:48:15
Message-ID: 700a3c59-804a-44d0-8b3a-6bb1d28733c3@tantorlabs.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/17/26 01:51, Enrique Sánchez wrote:

> I think it's useful to know the estimated number of groups to
> understand why the planner chooses IncrementalSort. The patch looks clean.
>
> There are no tests for this change, although it should be safe, you
> might want to consider adding one to
> `src/test/regress/sql/incremental_sort.sql`.

Memoize has similar planner estimation output in EXPLAIN, but has no
regression tests for it either. Besides, in `inremental_sort` test all
EXPLAIN calls use COSTS OFF, so the new line would not appear there at
all. To be honest, I don't see any reason to display it in regression tests.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2026-06-17 10:59:11 Re: [PATCH] Preserve replication origin OIDs in pg_upgrade
Previous Message Ewan Young 2026-06-17 10:36:17 Re: btree_gist: Fix NaN handling in float4 and float8 opclasses