Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make EXPLAIN STATEMENT show logical and physical plans to run on regions #5170

Open
NiwakaDev opened this issue Dec 15, 2024 · 2 comments
Open
Labels
C-enhancement Category Enhancements

Comments

@NiwakaDev
Copy link
Collaborator

NiwakaDev commented Dec 15, 2024

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

@NiwakaDev NiwakaDev added the C-enhancement Category Enhancements label Dec 15, 2024
@NiwakaDev
Copy link
Collaborator Author

I'm interested in query crate. So if this feature makes sense, I'd like to implement this feature.

@evenyag
Copy link
Contributor

evenyag commented Dec 16, 2024

@waynexia What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
None yet
Development

No branches or pull requests

2 participants