Avoid duplicate indexes
SQL
Hard
4 views
Problem Description
You already have index on (city, name). Someone wants another on city only. How do you decide? Put reasoning in description and leave sample_solution as a metadata check query.
Constraints
Check existing indexes first
Official Solution
SELECT index_name, column_name, seq_in_index FROM information_schema.statistics WHERE table_name='Customers';
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!