Emergency server help: get in touch

AI Slow Query Advisor for MySQL and MariaDB

Paste a slow MySQL or MariaDB query, optionally with EXPLAIN output and SHOW CREATE TABLE, and get a diagnosis, exact index statements, a rewrite and how to verify the improvement.

Status
Live
Last updated
October 7, 2026

The AI slow query advisor reviews a slow MySQL or MariaDB query and explains why it is slow and how to fix it. Add the EXPLAIN output and the table definition for the best answer: the advisor reads the access type, chosen key and row estimates and proposes exact ALTER TABLE statements with the column order explained.

AI answers can be wrong. Read every command before you run it, and test on a non-production server first. Your input is sent to our AI provider (srvScripts AI) to write the answer. srvScripts does not log your input; the answer, which can quote it, is cached for 24 hours so a repeat question is answered instantly. See the privacy policy.

Typical wins are WordPress postmeta lookups, WooCommerce order searches, reporting queries that sort large tables and joins missing a composite index.

How to use the AI slow query advisor

  1. Pick MariaDB or MySQL 8.
  2. Paste the query from the slow log.
  3. Optionally paste EXPLAIN (or ANALYZE FORMAT=JSON) and SHOW CREATE TABLE output.
  4. Press Analyze query, test the index on a copy or off-peak, and compare EXPLAIN before and after.

What you get

  • A diagnosis citing the EXPLAIN rows, type and key.
  • Exact index statements with reasoning and a warning about write cost and online DDL on large tables.
  • A rewritten query when that helps more than an index.
  • How to verify the improvement.

Worked example

Example: a WooCommerce product search filters wp_postmeta on meta_key and a numeric meta_value and takes eight seconds. With EXPLAIN pasted, the advisor points out the full scan on meta_value, suggests a composite index on (meta_key, meta_value(32)), notes the write cost on a large table and shows the EXPLAIN change to expect.

Tips for better answers

Related guides: InnoDB tuning for shared hosting and fixing too many connections on cPanel.

Privacy and limits

Before anything is sent, srvScripts removes private keys, passwords, tokens and API keys it recognises. With the box ticked it also swaps public IP addresses and e-mail addresses for placeholders, which lowers the risk when you paste real logs. The masking is automatic and best effort: it can miss names, hostnames, keys or other customer details, so remove anything confidential before you paste. Your text goes to our AI provider only to write the answer. srvScripts does not save your input as a record of its own, but the masked input is sent to the AI provider to produce the answer, and the answer, which can quote parts of your input, is cached on our server for 24 hours so a repeat question is answered instantly, and is then deleted. The provider’s own API data terms apply to what it receives. Without an account you get 5 runs a day, a free account gets 15 and srvScripts Pro 200, with larger inputs.

At a glance

AI Slow Query Advisor for MySQL and MariaDB summary card: The AI slow query advisor reviews a slow MySQL or MariaDB query and explains why it is slow and how to fix it.
In short: The AI slow query advisor reviews a slow MySQL or MariaDB query and explains why it is slow and how to fix it.
AI slow query advisor – overview of what it covers
What the AI slow query advisor covers.

Official documentation: MariaDB slow query log, MySQL EXPLAIN output format.

Frequently asked questions

Is it safe to add the indexes the AI slow query advisor suggests?

Indexes speed up reads but slow writes and take time to build on big tables. Add them off-peak, ideally with online DDL, and test first.

Does it need my data?

No. The query, EXPLAIN output and table definition are enough.

Does it work for PostgreSQL?

It is tuned for MySQL and MariaDB; PostgreSQL answers may be less precise.

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.