sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

[DRAFT] add raw explain

Open rucciva opened this issue 1 year ago • 0 comments

Hello, i would like to propose the addition of new command that simply output yaml containing the result of running EXPLAIN, where each items contains the query, the arguments used when explain, and the raw output.

My motivation are:

  1. CMIIW, the current cel can't provide full assertion since the json output of explain has varying depths based on the query, meanwhile cel can't do dynamic recursion
  2. if we simply output the explain result, we could combine it with other tools, thus the assertion of query explain can be very dynamic

I think the detailed functionality of this subcommand might need further improvement, e.g. whether to allow specifying options to EXPLAIN query or whether we should parse the explain result if it is a formatted (json) output,so feedback are very welcome.

rucciva avatar Sep 05 '24 04:09 rucciva