Getting Started
Make sure to first set up your PlanetScale developer environment. Once you’ve installed thepscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.
The insights command
Surface PlanetScale’s server-side analysis of a database: aggregated query statistics, failing query patterns, resource anomalies, and schema recommendations, all computed from production traffic.
For live, connection-level diagnostics (table sizes, locks, running queries), use pscale inspect instead.
Query insights require Query Insights to be enabled for the database. See Postgres or Vitess. Postgres and Vitess branches are supported.
Usage:
--org is required.
Available sub-commands
Available flags
Examples
The queries sub-command
List the top queries for a branch, ranked by cumulative execution time (default).
Usage:
Examples:
The errors sub-command
List failing query patterns with error messages.
Usage:
Example:

