Conversation
e30adbe to
d4b8b72
Compare
|
The current EXPLAIN support (which passes through the query to one of the tablets) is a useful feature which I don't think we should replace that with the support for showing the query plan from vtgate. Of course... showing the query plan is also quite useful :) IMO we should actually integrate the two so that for a simple query, we would merge the vtgate plan info with the mysql level plan. This would be relatively straightforward with But IMO we should also support the traditional explain output. The primitive already has hooks to extract the RouteType and TableName which we could map into the select_type and table columns. With some future enhancements we could maybe even reuse the possible_keys and key columns to show which vindex was used for select queries: Then the json plan could be stuffed into the Extra column and then merged with the results that we get back from mysql. |
|
Thanks for the feedback, @demmer. My thinking was that the Vitess query plans forms a tree which at the lowest level most of the time there is one (or many) MySQL instance(s) executing a query. What we could do is to integrate the two trees - any |
Will show the Vitess query plan when prepending a SELECT query with EXPLAIN Signed-off-by: Andres Taylor <antaylor@squareup.com>
Make sure EXPLAIN works with other statements, not just SELECT Signed-off-by: Andres Taylor <antaylor@squareup.com>
Signed-off-by: Andres Taylor <antaylor@squareup.com>
Signed-off-by: Andres Taylor <antaylor@squareup.com>
|
Trying again here: #6110 |
Will show the Vitess query plan when prepending a SELECT query with EXPLAIN.
Example output: