0% found this document useful (0 votes)
4 views1 page

Query Optimisation

Query optimization is the process of enhancing query performance through various methods such as using indexes and limiting data set size. The main goals are to reduce execution time, minimize resource usage, and increase throughput. Challenges include exponential search space, outdated statistics, and complex queries.

Uploaded by

drsxgbzrs2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Query Optimisation

Query optimization is the process of enhancing query performance through various methods such as using indexes and limiting data set size. The main goals are to reduce execution time, minimize resource usage, and increase throughput. Challenges include exponential search space, outdated statistics, and complex queries.

Uploaded by

drsxgbzrs2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

QUERY OPTIMISATION.

This is the process of improving the performance of a query by transforming it.

WAYS TO QUERY OPTIMISATION.

1. Use of indexes
2. Using the right data types
3. Use of temporary tables
4. Limiting the data set size
5. Minimizing subqueries

GOALS FOR OPTIMIZING QUERIES.

1. Reduce query execution time


2. Minimize resource usage
3. Increase throughput

TYPES OF QUERY OPTIMIZATION

1. Rule-based optimization (RBO); Rule-based optimizers apply predefined transformation rules to


rewrite the query in a potentially more efficient form. For example, a rule might specify that a
WHERE clause should be applied as early as possible in the query to reduce the dataset size.
2. Cost-based optimization (CBO); cost-based optimizers are used to calculate the cost of multiple
query plans.
3. Heuristic optimization; this approach combines both ROB and CBO.

CHALLENGES IN QUERY OPTIMIZATION

1. Exponential search space


2. Outdated statistics
3. Complex queries
4. Changing data

You might also like