Showing posts with label query optimization. Show all posts
Showing posts with label query optimization. Show all posts

Wednesday, December 1, 2021

DBMS MCQ - What is query optimization

Multiple choices questions in DBMS, What is query optimization? Why a schedule is said to be non-conflict serializable?

DBMS MCQ - Query Optimization

< Previous                      

Next >

 

1.The activity of choosing an efficient execution strategy for processing a query is called as  

a) Query execution

b) Query optimization

c) Query plan evaluation

d) Query parsing

Answer: (b) Query optimization

Query optimization is a process of choosing the cheapest and efficient of several equivalent query execution plans by using the statistics about data. A query typically has many possible execution strategies, and the process of choosing a suitable one for processing a query is known as query optimization.

Why do we need to optimize the query?

As there are many equivalent transformations of the same high-level query, the aim of query optimization is to choose the one that minimizes resource usage.

Need more clarity? Please read further.

A query which is written by the user may not be the efficient one. Also, the query written by the user can be transformed into several equivalent (each one producing the same result) expressions (queries).

The cost of processing each of these equivalent expressions is different. One may be costly and the other may be cheap.

We do not expect users to write their queries so that they can be processed efficiently. Rather, we expect the system to construct a query-evaluation plan that minimizes the cost of query evaluation. This is where query optimization comes into play.

Query optimization is the process of selecting the most efficient query-evaluation plan from among the many strategies usually possible for processing a given query, especially if the query is complex.

 

< Previous                      

Next >


************************
Related posts:


Query optimization in dbms

Quiz questions with answers on DBMS concepts

Why do we need to optimize the query?

Why there are many equivalent query expressions for retrieving something?

Important aspect of query processing is query optimization

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery