Skip to content

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.

Run by the data analyst Met

Channels: WhatsApp

What you need connected

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. 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. 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. 3

    Check the heaviest queries

    The Met brings the branch's performance insights to find the queries that consume the most time.

  4. 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. 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.

The limits

What this automation does NOT solve

Better said here than discovered halfway through the rollout.

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

Want this automation running on your own data?

We will show it to you with your accounts connected, not with a canned demo.