Automation · Operations and reporting
Check on WhatsApp why your PlanetScale database is slow
Ask on WhatsApp why the app is slow: an AI agent checks CPU, memory, slow queries, errors and recommendations in PlanetScale.
How do I know whether my app's slowness comes from the PlanetScale database?
You write to your Met "the app is slow, is it the database?". The Met finds your database and its main branch in PlanetScale, checks CPU, memory, disk and connections for the last hour, brings the query performance insights, lists the queries that are failing grouped by error and the schema recommendations, such as a missing index. It replies with what it found and what your team should check first. Everything is read-only: the Met does not run SQL or change the schema in this procedure.
What starts it
When someone asks for it
It starts when someone on the team asks the Met on WhatsApp whether the database is slow. Each check runs on request; the Met does not watch the database on its own.
A manual task: someone on the team runs it with a button, or asks the Met for it in chat.
Who runs it
Internal Met that checks your PlanetScale database
This is not a named, seeded Met. It is an internal Met with PlanetScale connected, for the owner or the agency that maintains the app: its work ends when it tells you what it found in the metrics, the queries and the recommendations.
Channels: WhatsApp
What you need connected
- PlanetScale Automate and collaborate
5 steps · 6 tools
The procedure, step by step
Each step shows the tool that runs. They belong to the real connector: if one of them stopped existing, this page would not build.
- 1
Find the database and its main branch
The Met lists your organization's databases and the branches of the one behind your app, and uses the main branch, the one named in its instructions.
- 2
Look at the infrastructure
The Met brings the last hour's summary of CPU, memory, disk, replication lag and connections, to see whether the branch is saturated or close to its limit.
- 3
Check the heaviest queries
The Met brings the branch's performance insights to find the queries that consume the most time.
- 4
Look for failing queries
The Met lists query errors grouped by pattern, with how many times they happened and the last time, in case the slowness comes from something that is failing.
- 5
Bring the recommendations and reply
The Met lists the database's schema recommendations, such as adding an index, and replies with a summary of what it saw and where to start.
Before you start
What you need ready
The Met solves none of these for you. If one is missing, the automation stops there.
-
PlanetScale connected in Met
In Met, open Connections → PlanetScale → Connect and sign in. For this procedure, read-only access to the database is enough.
-
An internal Met on WhatsApp
Assign the connector to a Met that only serves the team, not the one that talks to customers, because the same connection can bring queries on your data.
-
The database and branch in the instructions
Write in the Met's instructions which database is your app's and its main branch, so it always checks the right one.
The limits
What this automation does NOT solve
Better said here than discovered halfway through the rollout.
-
It does not fix the slowness. The Met tells you what it found; creating the index or changing the query is your team's work.
-
It does not see slowness that comes from outside the database, such as the app server or the network. It only looks at what PlanetScale measures.
-
It does not alert you on its own when the database slows down. The check starts when someone asks the Met.
-
It does not run SQL in this procedure. Read and write queries are in the listing, but this procedure does not use them.
FAQ
Questions about this automation
Yes. The tools in this procedure do not run queries. PlanetScale also has an insights-only server that excludes queries, although Met uses the full server.
Yes. PlanetScale says branch metrics work on Vitess, Postgres and Neki. Server logs are Postgres only, and this procedure does not use them.
Creating an index is DDL that needs the write query, which starts turned off until the admin turns it on, and full access. This procedure does not do it; if your team decides to, it applies it through its usual change process.
Keep going
Other automations built on the same tools
Operations and reporting
Turn off on WhatsApp the feature flag that breaks the checkout in LaunchDarkly
How do I quickly turn off a feature flag that broke the checkout without opening LaunchDarkly?
- Starts:
- when someone asks for it
- Steps:
- 5, with 7 real tools
- Needs:
- LaunchDarkly
Operations and reporting
Build a department's higher education report without opening SNIES
How do I pull SNIES enrollment and program figures without going into the portal?
- Starts:
- when the customer writes
- Steps:
- 5, with 5 real tools
- Needs:
- SNIES
Operations and reporting
Build your team's org chart in Lucid on WhatsApp and share it
How do I build my business's org chart without sitting down to draw it?
- Starts:
- when someone asks for it
- Steps:
- 6, with 6 real tools
- Needs:
- Lucid
Operations and reporting
Tell customers on your status page that the store is down, asking on WhatsApp with Better Stack
How do I tell my customers my online store is down without opening Better Stack?
- Starts:
- when someone asks for it
- Steps:
- 6, with 6 real tools
- Needs:
- Better Stack
Want this automation running on your own data?
We will show it to you with your accounts connected, not with a canned demo.