Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
-- Query needs status, customer_id, total -- Create a covering index with all three columns CREATE INDEX idx_cover ON orders (status, customer_id, total); -- EXPLAIN shows "Using index" — no table access SELECT status, customer_id, total FROM orders WHERE status = 'shipped' AND customer_id = 10;
Result
Open