Estimating Projection Result Size
Straightforward, since we know:
- number of tuples in output
rout = | πa,b,..(T) | = | T | = rT
(in SQL, because of bag semantics)
- size of tuples in output
Rout = sizeof(a) + sizeof(b) + ... + tuple-overhead
Assume page size B,
bout = ceil(rT / cout),
where cout = floor(B/Rout)
If using select distinct ...
- | πa,b,..(T) | depends on proportion of duplicates produced
|