See whether the optimizer chooses your index.

Section: Verify usage

Explain a query

sql
sql
EXPLAIN SELECT id, total_amount
FROM orders
WHERE status = 'paid'
ORDER BY created_at DESC
LIMIT 50;
Explanation

Look at the chosen key, access method, estimated rows, and extra information.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Verify usage
Refresh table statistics
Help the optimizer make better choices after major data changes.
OpenIn sheetsqlsame section
Test with FORCE INDEX
Diagnostic tool for checking alternate index paths.
OpenIn sheetsqlsame section
Create a composite index
Support a filter plus order-by pattern.
OpenIn sheetsql1 tag match
Index a generated column
Practical route for function-based searches.
OpenIn sheetsql1 tag match
Create an invisible index
Test an index without making it visible to the optimizer by default.
OpenIn sheetsql1 tag match
Toggle index visibility
Hide or re-enable an index without dropping it.
OpenIn sheetsql1 tag match