dbtempo reads your schema, your slow log and your application code, then proposes — or applies — the indexes, rewrites and config changes that move latency. Query by query, and table by table.
No credit card Connect direct, over SSH, or via the agent MySQL · MariaDB · Postgres
dbtempo.com/threads/slow-checkout-query
Today
Slow checkout query
users.email lookup
orders join plan
Yesterday
checkout_orders index
add LIMIT to admin export
EXPLAIN of report
EK
Elena K.10:42
The checkout query takes 1.8s on prod for repeat customers. Here's the EXPLAIN.
sql · pasted
SELECT o.id, o.total_cents, c.email, c.first_name
FROM orders o
JOIN customers c ON c.id = o.customer_id
WHERE c.email = '[email protected]'AND o.status IN ('paid','shipped')
ORDER BY o.created_at DESCLIMIT20;
analysis · −1.2% credits
The plan does a type=ALL scan of customers because there's no index on email. Recommendation:
Add indexauto-PR safeest. −83% latency
ALTER TABLE customers ADD INDEX idx_customers_email (email);
Trusted by teams atLatchetNorthwindRiverbedPikonSlatecoreMarqueePhloem
How it works
Detect, analyze, fix — from one slow query to a whole table's workload.
Detect
Surfaces what's actually slow
dbtempo watches performance_schema, pg_stat_statements, and your slow log on each project’s schedule. It learns which queries cost you wall-clock time, not which ones look ugly.
Analyze
Reasons about your code, not just plans
Connect the repo and dbtempo locates the ORM call sites. Recommendations cite where the query is generated and what the framework expects.
Fix
Raises real PRs, with rollback
Index additions, LIMIT defaults, schema migrations — opened as PRs in your style, with EXPLAIN before/after and a one-command rollback.
Table-level analysis
One query is a symptom. The table is the problem.
Fixing queries one at a time leaves you with a table carrying six overlapping indexes and no idea which ones earn their keep. dbtempo’s index advisor reads every query that touches a table — plus the indexes already on it — and proposes one index set for the whole table.
Sees the whole workload
Every query hitting the table is weighed together, so one index can serve several access patterns instead of accumulating one index per query.
Says what to drop
Indexes another index already covers, and indexes nothing reads. Removals are always suggestions — dbtempo never drops an index on its own.
Checks with the planner
On PostgreSQL, a candidate is created as a hypothetical index and the query re-planned. If the planner would ignore it, it never reaches you as a recommendation.
01
Ask in chat
Paste a query, EXPLAIN output, or a whole slow log. No setup, no agent in your VPC.
02
Create a project
One wizard flow connects your database — directly, over SSH, or via the agent — and schedules scans.
03
Connect the repo
GitHub OAuth. We index the relevant code paths, never your secrets.
04
Review the PR
Or enable auto mode for whitelisted change types inside a maintenance window.
Paste mode sends the SQL or database artifact you submit through the analysis pipeline. Live collection submits query statistics, example query text, schema metadata, and execution plans, but not raw table rows. Credential handling per connection method is covered in the docs.
Do I need to install anything?
No. Chat analysis works with nothing installed, and direct or SSH connections are made from dbtempo’s side. Installing the dbtempo agent is optional — choose it when database credentials must stay inside your infrastructure.
Can dbtempo run migrations on my prod database?
Only after you explicitly allow the relevant auto-mode capability and enable database-level consent. Eligible changes must still pass the configured safety gates and maintenance window. Every attempt is recorded on the database’s Audit tab, including the ones a guardrail refused.
Which databases?
MySQL, MariaDB, and PostgreSQL support live collection. SQLite is supported for paste-mode analysis only.
Is dbtempo only for slow queries?
No. Alongside per-query analysis, dbtempo runs a table-level index advisor: it reads every query that touches a table together with the indexes already on it, then proposes one index set for that table — including indexes worth dropping because another index covers them or nothing reads them. Drops are always suggestions. On PostgreSQL, candidates are validated against the planner before they are recommended.
Does it work without a connected repo?
Yes — paste mode and EXPLAIN analysis work standalone. Repo connection adds call-site evidence and PRs.
What gets billed as a credit?
AI analysis consumes credits; deterministic rule evaluation does not. Current plan allowances are shown on the pricing page, while the signed-in product reports usage as a percentage.
How do I cancel?
Cancel from Settings → Billing. Access and retention after cancellation follow the current plan and legal terms shown during billing.
Free
Free
Paste-mode analysis without a database connection.