greptimedb
greptimedb copied to clipboard
Make `EXPLAIN STATEMENT` show logical and physical plans to run on regions
trafficstars
What type of enhancement is this?
User experience
What does the enhancement do?
Greptimedb already supports distributed EXPLAIN ANALYZE STATEMENT(#3908).
However, EXPLAIN STATEMENT like EXPLAIN select * from system_metrics displays logical and physical plans only on the front side:
+---------------+--------------------------------------------------+
| plan_type | plan |
+---------------+--------------------------------------------------+
| logical_plan | MergeScan [is_placeholder=false] |
| physical_plan | MergeScanExec: peers=[4398046511104(1024, 0), ] |
+---------------+--------------------------------------------------+
I guess it's better to display logical and physical plans to run on regions for both developers and users, like this:
+---------------+--------------------------------------------------+
| plan_type | plan |
+---------------+--------------------------------------------------+
| logical_plan | MergeScan [is_placeholder=false] |
| | Projection: ~ |
| | Filter: ~ |
| | TableScan: |
| physical_plan | MergeScanExec: peers=[4398046511104(1024, 0), ] |
| ~ |
+---------------+--------------------------------------------------+
Or
+---------------+------------------------------------------------------------------+
| stage | plan_type | plan |
+---------------+------------------------------------------------------------------+
| 0 | logical_plan | MergeScan [is_placeholder=false] |
| 1 | | Projection: ~ |
| 1 | | Filter: ~ |
| 1 | | TableScan: demo |
| 0 | physical_plan | MergeScanExec: peers=[4398046511104(1024, 0), ] |
| 1 | ~ | |
+---------------+------------------------------------------------------------------+
Implementation challenges
No response