Guidelines for Query Tuning (Contd.)
Avoid using intermediate relations:
- Does not materialize the intermediate reln Temp.
- If there is a dense B+ tree index on <dno, sal>, an index-only plan can be used to avoid retrieving Emp tuples in the second query!