Database Programming :: Projects :: Optimized Video
For each of the following queries, use EXPLAIN to see how the query will be executed. Then add index(es), and retry the EXPLAIN to see how the query has been improved (or not). Write about what you tried and why in a Google Doc. Try at least two indexes for each query. You should include the explain table for each query you attempt.
List the MovieCode, Title, and Price for every movie between $20 and $30 (inclusive).
For each type of movie, list the type and average price in ascending order of price.
Find the Title and Studio Name for every movie directed by Steven Spielberg.
List all the movie titles in descending order at the downtown Naperville branch.
List the directors with movies produced by Warner Brothers. Each director should be listed exactly once and they should be listed in alphabetical order.
Finally, list all of your query results (only the queries you added indexes for) in order from fastest to slowest in the Google Doc.