Appearance
sys.query_explain
This view records the query plan for each currently active query and contains a row for each node in the plan. A unique row in this table is identified by a combination of plan ID and node ID. The rows in the table map to the node-level text output that is returned when you run an EXPLAIN ANALYZE command.
See sys.log_query_explain for a description of the columns in the view.
For example:
premdb=# select * from sys.query_explain;
plan_id | node_id | index | type | workers | query_plan
---------+---------+-------+------+---------+------------
(0 rows)
premdb=# \watch
Watch every 2s Thu Feb 1 15:34:20 2018
plan_id | node_id | index | type | workers | query_plan
---------+---------+-------+------+---------+------------
(0 rows)
...
Watch every 2s Thu Feb 1 15:34:28 2018
plan_id | node_id | index | type | workers | query_plan
----------------------------------------------+---------+-------+-----------------+---------+------------------------------------------------------------------------------------------------------------------
v2i-xVAwlrav2rBiQmxF50CLB0fWdHyuoBvhOj7WMnU= | 0 | 0 | WRITE ROW STORE | all | WRITE ROW STORE +
| | | | | (newmatchstats.seasonid, newmatchstats.matchday, newmatchstats.htid, newmatchstats.atid, newmatchstats.moment) +
| | | | | distribute none
v2i-xVAwlrav2rBiQmxF50CLB0fWdHyuoBvhOj7WMnU= | 1 | 1 | INSERT INTO | all | INSERT INTO newmatchstats +
| | | | | (newmatchstats.seasonid, newmatchstats.matchday, newmatchstats.htid, newmatchstats.atid, newmatchstats.moment)
v2i-xVAwlrav2rBiQmxF50CLB0fWdHyuoBvhOj7WMnU= | 3 | 2 | DISTRIBUTE HASH | all | DISTRIBUTE HASH (degraded only) +
| | | | | (newmatchstats.seasonid, newmatchstats.matchday, newmatchstats.htid, newmatchstats.atid, newmatchstats.moment) +
| | | | | distribute (newmatchstats.seasonid)
v2i-xVAwlrav2rBiQmxF50CLB0fWdHyuoBvhOj7WMnU= | 2 | 3 | APPEND SCAN | all | APPEND SCAN +
| | | | | (newmatchstats.seasonid, newmatchstats.matchday, newmatchstats.htid, newmatchstats.atid, newmatchstats.moment)
v2i-xVAwlrav2rBiQmxF50CLB0fWdHyuoBvhOj7WMnU= | 5 | 4 | TRANSPOSE | all | |-TRANSPOSE +
| | | | | (newmatchstats.seasonid, newmatchstats.matchday, newmatchstats.htid, newmatchstats.atid, newmatchstats.moment)
v2i-xVAwlrav2rBiQmxF50CLB0fWdHyuoBvhOj7WMnU= | 4 | 5 | SCAN | all | | SCAN newmatchstats +
| | | | | (newmatchstats.seasonid, newmatchstats.matchday, newmatchstats.htid, newmatchstats.atid, newmatchstats.moment)+
| | | | | distribute (newmatchstats.seasonid)
v2i-xVAwlrav2rBiQmxF50CLB0fWdHyuoBvhOj7WMnU= | 7 | 6 | SCAN ROW STORE | single | |-SCAN ROW STORE +
| | | | | (newmatchstats.seasonid, newmatchstats.matchday, newmatchstats.htid, newmatchstats.atid, newmatchstats.moment)+
| | | | | distribute none
(7 rows)
...