Re: Improving EXPLAIN's display of SubPlan nodes

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: Improving EXPLAIN's display of SubPlan nodes
Дата
Msg-id CAEZATCXiwEyedNkcNOH+U7ejMn0LkUyFSHoLGGtu=bVQKDGDQA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improving EXPLAIN's display of SubPlan nodes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Improving EXPLAIN's display of SubPlan nodes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 19 Mar 2024 at 16:42, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Here's a hopefully-final version that makes that adjustment and
> tweaks a couple of comments.
>

This looks very good to me.

One final case that could possibly be improved is this one from aggregates.out:

explain (verbose, costs off)
select array(select sum(x+y) s
            from generate_series(1,3) y group by y order by s)
  from generate_series(1,3) x;
                            QUERY PLAN
-------------------------------------------------------------------
 Function Scan on pg_catalog.generate_series x
   Output: ARRAY(SubPlan 1)
   Function Call: generate_series(1, 3)
   SubPlan 1
     ->  Sort
           Output: (sum((x.x + y.y))), y.y
           Sort Key: (sum((x.x + y.y)))
           ->  HashAggregate
                 Output: sum((x.x + y.y)), y.y
                 Group Key: y.y
                 ->  Function Scan on pg_catalog.generate_series y
                       Output: y.y
                       Function Call: generate_series(1, 3)

ARRAY operates on a SELECT with a single targetlist item, but in this
case it looks like the subplan output has 2 columns, which might
confuse people.

I wonder if we should output "ARRAY((SubPlan 1).col1)" to make it
clearer. Since ARRAY_SUBLINK is a special case, which always collects
the first column's values, we could just always output "col1" for
ARRAY.

Regards,
Dean



В списке pgsql-hackers по дате отправления:

Предыдущее
От: walther@technowledgy.de
Дата:
Сообщение: Re: Possibility to disable `ALTER SYSTEM`
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Partial aggregates pushdown