924060929 opened a new pull request, #31339:
URL: https://github.com/apache/doris/pull/31339

   ## Proposed changes
   
   show process time when execute `explain plan xxx` by nereids
   
   example:
   ```
   mysql> explain plan select * from tt;
   
+---------------------------------------------------------------------------------------------------------------+
   | Explain String(Nereids Planner)                                            
                                   |
   
+---------------------------------------------------------------------------------------------------------------+
   | ========== PARSED PLAN (time: 7 ms) ==========                             
                                   |
   | UnboundResultSink[3] (  )                                                  
                                   |
   | +--LogicalProject[2] ( distinct=false, projects=[*], excepts=[] )          
                                   |
   |    +--LogicalCheckPolicy (  )                                              
                                   |
   |       +--UnboundRelation ( id=RelationId#0, nameParts=tt )                 
                                   |
   |                                                                            
                                   |
   | ========== ANALYZED PLAN (time: 10 ms) ==========                          
                                   |
   | LogicalResultSink[11] ( outputExprs=[id#0, name#1] )                       
                                   |
   | +--LogicalProject[9] ( distinct=false, projects=[id#0, name#1], excepts=[] 
)                                  |
   |    +--LogicalOlapScan ( qualified=test.tt, indexName=<index_not_selected>, 
selectedIndexId=10361, preAgg=ON ) |
   |                                                                            
                                   |
   | ========== REWRITTEN PLAN (time: 3 ms) ==========                          
                                   |
   | LogicalResultSink[22] ( outputExprs=[id#0, name#1] )                       
                                   |
   | +--LogicalOlapScan ( qualified=test.tt, indexName=tt, 
selectedIndexId=10361, preAgg=ON )                      |
   |                                                                            
                                   |
   | ========== OPTIMIZED PLAN (time: 4 ms) ==========                          
                                   |
   | PhysicalResultSink[53] ( outputExprs=[id#0, name#1] )                      
                                   |
   | +--PhysicalDistribute[50]@0 ( stats=2, 
distributionSpec=DistributionSpecGather )                              |
   |    +--PhysicalOlapScan[tt]@0 ( stats=2 )                                   
                                   |
   
+---------------------------------------------------------------------------------------------------------------+
   19 rows in set (0.03 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to