














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















DBMS strive to process the query in the most efficient way (in terms of ‘Time’) to produce the answer.
Cost = Time needed to get all answers
Parser
Optimizer
Code Generator/ Interpreter
Processor
SQL
Joins, unions, and intersections are associative and commutative.
Factors mentioned above should be limited and minimized when creating the best physical plan.
Let’s take a relation ‘R’ Relation (20,000 tuples): R(a, b, c) Each Tuple (190 bytes): header = 24 bytes, a = 8 bytes, b = 8 bytes, c = 150 bytes Each Block (1024): header = 24 bytes
Now, the new estimate will be 25 tuples in 1 block.
Result is reduction by a factor of 5
Embedded Query:
projection
filter
join
Scan (Patients) Scan (Doctors)
projection projection filter join join Filter
Scan (Patients) Scan (Doctors) Scan(Patients) Scan(Doctors)