Junior — Senior
Determining the best indexes to improve SQL query performance
livecode
Task condition
The system has a query that runs without using indexes. It is necessary to suggest the optimal index (or set of indexes) that will maximize the speed of this query.
SELECT email, firstName, lastName, role FROM User WHERE firstName = ? AND lastName = ?;
SELECT email, firstName, lastName, role FROM User WHERE firstName = ? OR lastName = ?;
(lastName, firstName)