greptimedb
greptimedb copied to clipboard
The explain of SQL output doesn't help
What type of enhancement is this?
User experience
What does the enhancement do?
For example:
mysql> explain select * from test where i = 'hello2';
+---------------+--------------------------------------------------+
| plan_type | plan |
+---------------+--------------------------------------------------+
| logical_plan | MergeScan [is_placeholder=false] |
| physical_plan | MergeScanExec: peers=[4415226380288(1028, 0), ]
|
+---------------+--------------------------------------------------+
We just saw a MergeScan node, without any filter or table scan node etc. And we don't know what is_placeholder is in logical_plan or what peers means in physical_plan.
If we are using explain analyze, we don't get any info about whether the query uses the index or not:
mysql> explain analyze select * from test where i = 'hello2';
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Plan with Metrics | MergeScanExec: peers=[4415226380288(1028, 0), ], metrics=[output_rows=1, greptime_exec_cost=0, first_consume_time=25.720291ms, finish_time=25.839667ms, ready_time=24.626125ms]
|
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
I am uncertain whether it's intentional or simply another glitch.
Implementation challenges
No response