← Back to blog

21 Dec 2025

Magento + MySQL: the 3 queries I always check first

If it’s slow, it’s usually one of these.

Critical queries:
1) `catalog_product_entity` joins
2) `inventory_source_item` (MSI)
3) `sales_order_grid`

In Magento, the usual culprit is an outdated `sales_order_grid`.

Quick fix:
```
bin/magento indexer:reindex sales_order_grid
```

If it doesn’t scale, consider moving grids to a separate DB or tuning indexes.

With MySQL slow query log, check:
- `SHOW PROCESSLIST` during peaks.
- Queries without indexes using `LIKE %`.
- Locks on `sales_order` from batch processes.

Magento doesn’t forgive large tables without well‑designed indexes.

Comments

I am not a robot
reCAPTCHA Privacy · Terms

Related

Recommended reads

Magento 2 at peak traffic: how to avoid lock storms during reindex

Read

Magento 2: how to read the checkout profiler without getting lost

Read

Redis in Magento: 5 common mistakes that break performance

Read