Unique
UniqueSort
Cost
- Sort cost: 1 + log(N/B) / log(B−1) passes.
- Pass to eliminate duplicates: No more than 1 pass. (Output could be considerably smaller than input.)
where:
- N: Size of input, measured in pages.
- B: Amount of memory available for sorting.
But:
- The input stream is not coming from disk, (it's output from another operator).
- The output stream is not be going to disk.
So that saves up to 1 pass.
|