1/13
Looks like no tags are added yet.
What are the aims of query processing?
transform high level lang query → correct & efficient execution strategy expressed in lower level lang
execute strategy to retrieve required data
What is an execution plan?
the way chosen to execute a query in relational algebra

What type of language is relational algebra and what does that mean about the order operations are evaluated?
procedural language
operations evaluated in order specified
What is query optimisation?
choosing the most efficient execution plan
What are the 4 stages of query processing?
Query Decomposition/Parsing
Query Optimisation
Code Generation
Runtime Query Execution
What is used during query decomposition and what does it do?
DBMS QUERY PROCESSOR
transforms user query → sequence of operations on relations
selects execution strategy
written in low level lang
specifies how to retrieve + manipulate data
checks synthetic + semantic query correctness
produces relational algebra query tree
What are the 2 main speed performance measures?
Throughput
no. taks that can be completed within a given time period
Response Time
amount of time required to complete single task
What is considered during query optimisation in order to choose the most efficient execution strategy/plan for processing a query?
cost based strategies
table size
disk access
rule based strategies
heuristic rule: perform selection & projection as early as possible to reduce size of relation + subsequent processing of that relation
System catalog statistics
often used for cost esimation
At the end of the decomposition stage what is the query converted into?
an internal representation
relational algebra query tree often used

How is a query tree built?
from the leaf nodes upwards
What are each of the leaf nodes in a relational algebra query tree created for?
each base relation
What are each of the intermediate nodes in a relational algebra query tree created for?
results of relational algebra operations
What is the root of the tree the result of in a relational algebra query tree?
the query
If there are multiple joins how do you decide the join order?
base on the estimated size of tables & intermediate results
