Remove VERBOSE output to make pg14 and pg13 output the same

pull/5209/head
Sait Talha Nisanci 2021-08-19 10:50:24 +03:00
parent abd3c1089b
commit 3f5c178c93
2 changed files with 8 additions and 31 deletions

View File

@ -675,7 +675,7 @@ LIMIT
2 | 1 2 | 1
(5 rows) (5 rows)
EXPLAIN (COSTS FALSE, VERBOSE TRUE) EXPLAIN (COSTS FALSE)
SELECT * SELECT *
FROM ( FROM (
( SELECT user_id, ( SELECT user_id,
@ -712,69 +712,46 @@ EXPLAIN (COSTS FALSE, VERBOSE TRUE)
QUERY PLAN QUERY PLAN
--------------------------------------------------------------------- ---------------------------------------------------------------------
Limit Limit
Output: remote_scan.user_id, remote_scan.sum
-> Sort -> Sort
Output: remote_scan.user_id, remote_scan.sum
Sort Key: remote_scan.sum DESC, remote_scan.user_id DESC Sort Key: remote_scan.sum DESC, remote_scan.user_id DESC
-> Custom Scan (Citus Adaptive) -> Custom Scan (Citus Adaptive)
Output: remote_scan.user_id, remote_scan.sum
Task Count: 4 Task Count: 4
Tasks Shown: One of 4 Tasks Shown: One of 4
-> Task -> Task
Query: SELECT worker_column_1 AS user_id, worker_column_2 AS sum FROM (SELECT ftop.user_id AS worker_column_1, ftop.sum AS worker_column_2 FROM (SELECT user_id_1.user_id, sum(user_id_1.counter) AS sum FROM (SELECT users_table.user_id, sum(users_table.value_2) OVER (PARTITION BY users_table.user_id) AS counter FROM public.users_table_1400256 users_table UNION SELECT events_table.user_id, sum(events_table.value_2) OVER (PARTITION BY events_table.user_id) AS counter FROM public.events_table_1400260 events_table) user_id_1 GROUP BY user_id_1.user_id UNION SELECT user_id_2.user_id, sum(user_id_2.counter) AS sum FROM (SELECT users_table.user_id, sum(users_table.value_2) OVER (PARTITION BY users_table.user_id) AS counter FROM public.users_table_1400256 users_table UNION SELECT events_table.user_id, sum(events_table.value_2) OVER (PARTITION BY events_table.user_id) AS counter FROM public.events_table_1400260 events_table) user_id_2 GROUP BY user_id_2.user_id) ftop) worker_subquery ORDER BY worker_column_2 DESC, worker_column_1 DESC LIMIT '5'::bigint
Node: host=localhost port=xxxxx dbname=regression Node: host=localhost port=xxxxx dbname=regression
-> Limit -> Limit
Output: users_table.user_id, (sum((sum(users_table.value_2) OVER (?))))
-> Sort -> Sort
Output: users_table.user_id, (sum((sum(users_table.value_2) OVER (?))))
Sort Key: (sum((sum(users_table.value_2) OVER (?)))) DESC, users_table.user_id DESC Sort Key: (sum((sum(users_table.value_2) OVER (?)))) DESC, users_table.user_id DESC
-> HashAggregate -> HashAggregate
Output: users_table.user_id, (sum((sum(users_table.value_2) OVER (?))))
Group Key: users_table.user_id, (sum((sum(users_table.value_2) OVER (?)))) Group Key: users_table.user_id, (sum((sum(users_table.value_2) OVER (?))))
-> Append -> Append
-> HashAggregate -> HashAggregate
Output: users_table.user_id, sum((sum(users_table.value_2) OVER (?)))
Group Key: users_table.user_id Group Key: users_table.user_id
-> HashAggregate -> HashAggregate
Output: users_table.user_id, (sum(users_table.value_2) OVER (?))
Group Key: users_table.user_id, (sum(users_table.value_2) OVER (?)) Group Key: users_table.user_id, (sum(users_table.value_2) OVER (?))
-> Append -> Append
-> WindowAgg -> WindowAgg
Output: users_table.user_id, sum(users_table.value_2) OVER (?)
-> Sort -> Sort
Output: users_table.user_id, users_table.value_2
Sort Key: users_table.user_id Sort Key: users_table.user_id
-> Seq Scan on public.users_table_1400256 users_table -> Seq Scan on users_table_1400256 users_table
Output: users_table.user_id, users_table.value_2
-> WindowAgg -> WindowAgg
Output: events_table.user_id, sum(events_table.value_2) OVER (?)
-> Sort -> Sort
Output: events_table.user_id, events_table.value_2
Sort Key: events_table.user_id Sort Key: events_table.user_id
-> Seq Scan on public.events_table_1400260 events_table -> Seq Scan on events_table_1400260 events_table
Output: events_table.user_id, events_table.value_2
-> HashAggregate -> HashAggregate
Output: users_table_1.user_id, sum((sum(users_table_1.value_2) OVER (?)))
Group Key: users_table_1.user_id Group Key: users_table_1.user_id
-> HashAggregate -> HashAggregate
Output: users_table_1.user_id, (sum(users_table_1.value_2) OVER (?))
Group Key: users_table_1.user_id, (sum(users_table_1.value_2) OVER (?)) Group Key: users_table_1.user_id, (sum(users_table_1.value_2) OVER (?))
-> Append -> Append
-> WindowAgg -> WindowAgg
Output: users_table_1.user_id, sum(users_table_1.value_2) OVER (?)
-> Sort -> Sort
Output: users_table_1.user_id, users_table_1.value_2
Sort Key: users_table_1.user_id Sort Key: users_table_1.user_id
-> Seq Scan on public.users_table_1400256 users_table_1 -> Seq Scan on users_table_1400256 users_table_1
Output: users_table_1.user_id, users_table_1.value_2
-> WindowAgg -> WindowAgg
Output: events_table_1.user_id, sum(events_table_1.value_2) OVER (?)
-> Sort -> Sort
Output: events_table_1.user_id, events_table_1.value_2
Sort Key: events_table_1.user_id Sort Key: events_table_1.user_id
-> Seq Scan on public.events_table_1400260 events_table_1 -> Seq Scan on events_table_1400260 events_table_1
Output: events_table_1.user_id, events_table_1.value_2 (40 rows)
(63 rows)
-- test with window functions which aren't pushed down -- test with window functions which aren't pushed down
SELECT SELECT

View File

@ -441,7 +441,7 @@ ORDER BY
LIMIT LIMIT
5; 5;
EXPLAIN (COSTS FALSE, VERBOSE TRUE) EXPLAIN (COSTS FALSE)
SELECT * SELECT *
FROM ( FROM (
( SELECT user_id, ( SELECT user_id,