Understanding the database query optimization

Query optimization is the process of extracting most efficient query from a complex query.  To extract efficient query, query optimizer maintains some strategy or rules. Think that we work on huge data and it takes long time  to run a simple query. And also think when we run a complex query what will occur?
To solve this problem query optimizer finds solution by following some rules. To find the least costly query evaluation plan the optimizer needs to generate alternative plans that produce the same result as the given expression and to choose the least costly one. Generation of query evaluation plans involves two steps:
1. Generating expressions that are logically equivalent to the given expression.
2. Annotating the resultant expressions in alternative ways to generate an alternative query evaluation plan.
The optimize query must be same as the original query. Now consider the relational algebra expression for the query "Find the names of all customers who have an account at any branch located at Brooklyn."
This post will update immediately. Please be patient.....................
To improve this post please make sure your comment.


Popular posts from this blog

How to show only month and year fields in android Date-picker?

How to construct a B+ tree with example

Homebrew uninstall