This CLI feature is compatible with EdgeDB server 3.0 and above.
Run a query performance analysis on the given query.
edgedb analyze [options] query
Here’s example analyze
output from a simple query:
Contexts
analyze select ➊ Hero {name, secret_identity, ➋ villains: {name, nemesis: {name}}}
Shape
╰──➊ default::Hero (cost=20430.96)
╰──➋ .villains: default::Villain, default::Hero (cost=35.81)
The analyze
command runs on the database it is connected to. For specifying
the connection target see connection options.
The query to analyze. Be sure to wrap the query in quotes.
Print expanded output of the query analysis
Write analysis into the JSON file specified instead of formatting
Read JSON file instead of executing a query