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
(5 rows)
EXPLAIN (COSTS FALSE, VERBOSE TRUE)
EXPLAIN (COSTS FALSE)
SELECT *
FROM (
( SELECT user_id,
@ -709,72 +709,49 @@ EXPLAIN (COSTS FALSE, VERBOSE TRUE)
user_id)) AS ftop
ORDER BY 2 DESC, 1 DESC
LIMIT 5;
QUERY PLAN
QUERY PLAN
---------------------------------------------------------------------
Limit
Output: remote_scan.user_id, remote_scan.sum
-> Sort
Output: remote_scan.user_id, remote_scan.sum
Sort Key: remote_scan.sum DESC, remote_scan.user_id DESC
-> Custom Scan (Citus Adaptive)
Output: remote_scan.user_id, remote_scan.sum
Task Count: 4
Tasks Shown: One of 4
-> 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
-> Limit
Output: users_table.user_id, (sum((sum(users_table.value_2) OVER (?))))
-> 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
-> 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 (?))))
-> Append
-> HashAggregate
Output: users_table.user_id, sum((sum(users_table.value_2) OVER (?)))
Group Key: users_table.user_id
-> HashAggregate
Output: users_table.user_id, (sum(users_table.value_2) OVER (?))
Group Key: users_table.user_id, (sum(users_table.value_2) OVER (?))
-> Append
-> WindowAgg
Output: users_table.user_id, sum(users_table.value_2) OVER (?)
-> Sort
Output: users_table.user_id, users_table.value_2
Sort Key: users_table.user_id
-> Seq Scan on public.users_table_1400256 users_table
Output: users_table.user_id, users_table.value_2
-> Seq Scan on users_table_1400256 users_table
-> WindowAgg
Output: events_table.user_id, sum(events_table.value_2) OVER (?)
-> Sort
Output: events_table.user_id, events_table.value_2
Sort Key: events_table.user_id
-> Seq Scan on public.events_table_1400260 events_table
Output: events_table.user_id, events_table.value_2
-> Seq Scan on events_table_1400260 events_table
-> HashAggregate
Output: users_table_1.user_id, sum((sum(users_table_1.value_2) OVER (?)))
Group Key: users_table_1.user_id
-> 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 (?))
-> Append
-> WindowAgg
Output: users_table_1.user_id, sum(users_table_1.value_2) OVER (?)
-> Sort
Output: users_table_1.user_id, users_table_1.value_2
Sort Key: users_table_1.user_id
-> Seq Scan on public.users_table_1400256 users_table_1
Output: users_table_1.user_id, users_table_1.value_2
-> Seq Scan on users_table_1400256 users_table_1
-> WindowAgg
Output: events_table_1.user_id, sum(events_table_1.value_2) OVER (?)
-> Sort
Output: events_table_1.user_id, events_table_1.value_2
Sort Key: events_table_1.user_id
-> Seq Scan on public.events_table_1400260 events_table_1
Output: events_table_1.user_id, events_table_1.value_2
(63 rows)
-> Seq Scan on events_table_1400260 events_table_1
(40 rows)
-- test with window functions which aren't pushed down
SELECT

View File

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