It212 Lecture 7
It212 Lecture 7
Optimization
Enhancing Database Performance
By Mrs. Memory M Lumbwe
Introduction to Indexing
1. Balanced tree
structure that
maintains sorted
data for quick
data retrieval.
2. Commonly used
for both
clustered and
non-clustered
indexes.
Hash Index
1. Uses a hash
function to
compute the
location of data.
2. Very efficient for
equality searches
but not useful for
range queries.
Query Processing and Optimization
• Query Processing
• Validating SQL statements.
• Query rewriting for simplification.
• Generating execution plans.
• Query Optimization
• Selecting the most efficient execution plan.
• Cost-based evaluation considering CPU, I/O, and memory usage.
• Use of indexes to speed up access paths.
Query Optimization Strategies