
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
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Engineering
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University