Cloud Spanner Query Plan Visualizer using goccy/go-graphviz.
(Possibly) remote calls are rendered as dashed lines.
$ go get -u github.com/apstndb/spannerplanviz
It can read various types in JSON and YAML.
- QueryPlan
- Can get easily by client libraries
- ResultSetStats
- Output of DOWNLOAD JSON in the official query plan visualizer
- ResultSet
- Output of
gcloud spanner databases execute-sql
and execspansql
- Output of
$ gcloud spanner databases execute-sql --instance=sampleinstance sampledb --query-mode=PROFILE --format=yaml \
--sql "SELECT SongName FROM Songs" |
spannerplanviz --full --type=svg --output profile.svg
$ gcloud spanner databases execute-sql --instance=sampleinstance sampledb --query-mode=PLAN --format=yaml \
--sql="SELECT SongName FROM Songs WHERE STARTS_WITH(SongName, @prefix)" |
spannerplanviz --full --type=svg --output plan.svg
This tool is PRE-ALPHA quality.