Spannerz
Google Cloud Spanner Query Planner Visualizer
Install / Use
/learn @rakyll/SpannerzREADME
spannerz
spannerz adds an HTTP handler to your binary to report query plans from Google Cloud Spanner clients. You can use spannerz as a standalone binary too.
NOTE: You need Graphviz installed for visualization features.
Goals
- Allow users to investigate their client setup in production without having to redeploy new versions.
- Allow users to run a visualizer outside of Google Cloud Console.
Usage
Standalone binary:
$ go get -u github.com/rakyll/spannerz
$ spannerz -db projects/PROJECT/instances/SPANNER_INSTANCE/databases/SPANNER_DB
HTTP handler:
import (
"cloud.google.com/go/spanner"
"github.com/rakyll/spannerz/spannerz"
)
client, err := spanner.NewClient(ctx, "projects/PROJECT/instances/SPANNER_INSTANCE/databases/SPANNER_DB")
if err != nil {
log.Fatalf("Cannot create Spanner client: %v", err)
}
http.Handle("/spannerz", &spannerz.Handler{
Client: client,
})
log.Fatal(http.ListenAndServe(":9090", nil))

Roadmap
- Allow running only the query planner without executing the query.
- Support different optimizer versions.
- Support partition queries.
- Support read/write transactions, we currently support read-only ones.
Disclaimer
This is not an official Google product.
Related Skills
node-connect
326.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
80.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
326.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
80.4kCommit, push, and open a PR
