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 query-patterns command
Download a CSV report of the query patterns for a database branch. The command creates a Query
Insights report, waits for the report to finish generating, and writes the CSV file locally.
Query pattern reports require Query Insights to be enabled for the database.
Usage:
Available sub-commands
| Sub-command | Product | Description |
|---|---|---|
download | Postgres, Vitess | Generate and download a CSV report of branch query patterns |
Available flags
| Flag | Description |
|---|---|
--output <path> | Output file for the CSV report. Defaults to query-patterns-<organization>-<database>-<branch>-<timestamp>.csv in the current directory. |
--org <org> | Organization name |
-f, --format <FORMAT> | Show the download result in a specific format. Possible values: human (default), json, csv. |
-h, --help | Help for query-patterns |

