2 views
23 Jan 2026
Create an index to speed up WHERE LOWER(name)=LOWER(?) on Customers....
3 views
23 Jan 2026
Orders table is filtered by status a lot. Create an index on status....
2 views
23 Jan 2026
Customers are searched by (city, name). Create a composite index....
2 views
23 Jan 2026
Prevent duplicate SKU in Products using a unique index....
2 views
23 Jan 2026
Drop index idx_orders_status....
3 views
23 Jan 2026
Create an index for faster queries on Orders(order_date)....
2 views
23 Jan 2026
Query: SELECT * FROM Orders WHERE customer_id=? AND order_date BETWEEN ? AND ?. Suggest an index and write it....
2 views
23 Jan 2026
Query needs only (order_date, total_amount) for reports. Create an index that helps covering these columns....
2 views
23 Jan 2026
Orders joins OrderItems on order_id. Write index statements to support this join....
2 views
23 Jan 2026
You have a column gender with only 2 values. Should you index it? Provide a practical answer in description, and give no index statement....
2 views
23 Jan 2026
You want index only on active rows (status='ACTIVE'). Create a helper column active_flag and index it with customer_id....
4 views
23 Jan 2026
Write a query idea to list indexes that are not used often. Keep it simple and generic....
2 views
23 Jan 2026
Customers are searched by name starting with 'ra'. Write an index and a matching query....
3 views
23 Jan 2026
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....
5 views
23 Jan 2026
After deleting millions of rows, you want to rebuild an index. Provide a generic rebuild statement....