Write the 5 different queries from the same tables and rows. This can use different indexes, joins,
Question:
Write the 5 different queries from the same tables and rows. This can use different indexes, joins, aggregates, merges, parallel/serial, etc. Then force a better query plan using hints
Here are the instructions:
-Create a database with some tables, insert some rows, and select 5 different queries.
-Save screenshots of the query plans generated by the optimizer for all 5 different queries.
-Run the queries and record the execution time.
-Add hints to the queries, and take screenshots of the new query plans.
-Run the queries with hints, and record the execution time.
-Show the impact of your hint by displaying the performance improvement. It can be calculated using the below formula:
-Percent Improvement = 100 * ( 1 - (optimized time / original time) )
-The bigger the improvement, the better.
-Tell us why the initial query plan was chosen by the query optimizer and what improvements you made, and the rationale behind your choices
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young