Projection ($\pi$)

Key Attribute:

Non-key Attribute:

Selection ($\sigma$)

单点/区间查询

使用优先级:

  1. Index (if indexed)
  2. (else) Binary Search (if sorted)
  3. (else) Linear Search

复合查询(多条件)

考虑:$\sigma_\text{age < 25 AND gender = F}\ (\text{students})$

如果只有 age 有 index: