
SQL Query Optimization and Execution Worksheet
Authored by Nandhini TJ
Engineering
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
93 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A banking analytics system receives SQL queries joining three tables: Accounts, Transactions, and Customers. The optimizer rewrites the query tree before execution. Which transformation occurs during this stage?
Logical optimization through heuristic rules
Query parsing and translation into relational algebra
Execution plan generation
Cost estimation using statistics
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A data warehouse query SELECT * FROM Sales WHERE amount>1000 AND region='APAC' passes through several stages. Which step determines which indexes or scans are used?
Parsing
Evaluation/Execution planning
Syntax checking
Logical transformation
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A government tax portal executes complex joins. What metric does the planner use to estimate cost?
Number of queries
CPU usage only
Number of disk I/Os and tuple comparisons
Cache miss rate
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In an OLTP system, optimizer chooses between join types. Orders fits in memory but Products does not. Which plan minimizes I/O?
Merge join
Block nested loop join
Cartesian join
Index join
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Optimizer converts a subquery in WHERE clause into a join. What is this process?
Physical optimization
Query rewriting (logical optimization)
Parsing
Execution
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An ecommerce dashboard runs SELECT COUNT(*) FROM Orders WHERE status='Shipped' using index on status. What happens during execution?
Index ignored
Index scan counts tuples without fetching full rows
Full table scan
Cached result
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Temporary relations are created during query execution. Which operator generates the largest temporary relation?
Projection
Join
Selection
Aggregation
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Engineering
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University