Documentation

Everything you need to get DBTempo running in your stack.

Getting started

DBTempo helps you identify and fix slow database queries. You can use it in two modes:

  • Paste mode — no setup required. Paste a slow query or EXPLAIN output into the chat and get instant index recommendations.
  • CLI mode — connects directly to your database and runs a full diagnostic scan. Produces actionable recommendations and optionally opens pull requests with the fixes.

Start by creating a free account. Your first 10,000 credits are free.

CLI installation

Install the CLI for your platform:

macOS
brew install dbtempo/tap/dbtempo
Linux
curl -fsSL https://install.dbtempo.com | bash
Windows
winget install dbtempo

Verify the installation:

dbtempo --version

Or follow the in-app guide at /databases/cli-install after signing in.

API keys

The CLI authenticates with an API key. Generate one from Settings → API Keys.

Authenticate the CLI:

dbtempo auth --key dbt_live_xxxxxxxxxxxx

Keys can be scoped to cli:run (run diagnostics only) or admin (full access). Revoke keys at any time from the Settings page.

Connecting a database

Add a connection from Databases → Add connection. Supported databases: MySQL 5.7+, MySQL 8.0, PostgreSQL (beta), MariaDB.

Run a diagnostic scan against your connection:

dbtempo run --connection <connection-id>

The CLI collects EXPLAIN plans, slow query logs, and schema statistics. All data is sanitized before leaving your environment — raw table data is never sent.

After a scan, results appear in a thread in the app, and any matched rules create recommendations automatically.

Recommendations & auto-PR

Recommendations appear in Recommendations. Each one shows the affected query, the proposed index or fix, estimated improvement, and confidence level.

Three actions are available per recommendation:

  • Accept — marks it done and optionally opens a PR if a repo is connected.
  • Open PR — creates a GitHub pull request with the migration SQL in your connected repository.
  • Dismiss — hides the recommendation.

Connect a GitHub repository from Settings → Repos to enable auto-PR.