|
IteratorsIntroductionExecution is guided by a tree of ``iterators'', each of which supports a ``get-next-tuple'' interface. When an answer tuple is requested by a get-next-tuple call on the root of the tree, similar similar calls are generated on iterators lower in the tree. Leaf level nodes (File Scan iterators and Index Scan iterators) retrieve tuples from a relation, and intermediate nodes in the tree (Join iterators) correspond to joins. Selections and projections are ``piggy-backed'' onto these iterators.
Click here for diagrams of some example iterator trees.
Simple Iterator Trees
Design DetailsThe output of one iterator can be made the input of another by using the uniform "get_next" call.
Types of IteratorsIn principle, there are several types of iterators:
As an example, click here to see why a join iterator in Minibase is really three iterators in one. |