[prev] 31 [next]

Index-only Projection

Can do projection without accessing data file iff ...
  • relation is indexed on (A1,A2,...An)    (indexes described later)
  • projected attributes are a prefix of (A1,A2,...An)

Basic idea:

  • scan through index file (which is already sorted on attributes)
  • duplicates are already adjacent in index, so easy to skip
Cost analysis ...
  • index has bi pages   (where bi ≪ bR)
  • Cost = bi reads + bOut writes