Diagnostic tool for checking alternate index paths.

Section: Verify usage

Test with FORCE INDEX

sql
sql
SELECT id
FROM orders FORCE INDEX (idx_orders_status_created_at)
WHERE status = 'paid'
ORDER BY created_at DESC
LIMIT 50;
Explanation

Useful for testing, but avoid relying on it as the first fix for poor design.

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
Explain a query
See whether the optimizer chooses your index.
OpenIn sheetsqlsame section
Refresh table statistics
Help the optimizer make better choices after major data changes.
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