crate/cratedb-toolkit

[CLI] Improve UX for analysis and debugging purposes

amotl opened this issue · 1 comments

About

GH-88 mostly revolves around queries to leverage information from CrateDB's internal sys.* tables. On a subsequent iteration, corresponding WTF-like tooling to support analysis and debugging purposes would also be helpful.

References

Support for EXPLAIN ANALYSE

The idea, in form of a synopsis, would be to run an EXPLAIN ANALYSE on a specific query before invoking it, and presenting the user relevant information parsed from its response in a more appealing way, also eventually highlighting possible flaws or caveats about it.

export CRATEDB_EXPLAIN=true
ctk query "SELECT * FROM foo WHERE ..."

On STDERR, before invoking the query, there could be an informative message like INFO: The query at hand will touch N partitions..

Later, with more information conveyed through EXPLAIN ANALYSE, the STDERR micro report could be expanded like INFO: The query at hand will touch partitions X, Y, Z, located on shards A, B, and C.