Once you have written a query that returns the right result, consider how it runs. Explain what work the database needs to do and what you would check before changing the query.
What to Check in a Query
Look at how many rows the query reads, how it joins tables and how much data it returns. Use the query plan to check your explanation rather than assuming that a shorter query must be faster.
