|< < 16 > >|

Overview of Database System Implementation

Query optimization

How to pick one?

Based on estimated cost.

Need a cost model.

  1. Index lookup: Probably requires 3-4 random accesses to disk.
  2. Scan: Read every page of the Employee table.

#1 is going to be cheaper.

Unless the Employee table is very tiny.

Need statistics to decide.

|< < 16 > >|