org.axiondb.engine.rowiterators
Class NestedLoopJoinedRowIterator

java.lang.Object
  extended by org.axiondb.engine.rowiterators.BaseRowIterator
      extended by org.axiondb.engine.rowiterators.AbstractJoinedRowIterator
          extended by org.axiondb.engine.rowiterators.NestedLoopJoinedRowIterator
All Implemented Interfaces:
RowIterator

public class NestedLoopJoinedRowIterator
extends AbstractJoinedRowIterator

A Nested Loop Join is performed by doing a scan over the left subtree and for each row in it performing a full scan of the right subtree. This is the default join algorithm, which can be used for any join. However, it is usually less efficient than the other methods. Usually, either an existing index, or a dynamic index, used in an ANL join, will cost much less. Occasionally, when subtree cardinalities are very low (possibly because of index bracketing), nested loop will be the method with the least cost.

Version:
$Revision: 1.7 $ $Date: 2005/04/02 18:23:30 $

Constructor Summary
NestedLoopJoinedRowIterator(RowIterator left, RowIterator right, int rightColumnCount)
           
NestedLoopJoinedRowIterator(RowIterator left, RowIterator right, int rightColumnCount, boolean rightOuter, boolean swapLeftAndRight)
           
 
Method Summary
protected  RowIterator generateRightRowIterator()
           
 void reset()
          Re-initialize this RowIterator to its initial state (positioned just before the first Rowin the list).
 java.lang.String toString()
           
 
Methods inherited from class org.axiondb.engine.rowiterators.AbstractJoinedRowIterator
current, currentIndex, getJoinCondition, getLeftRowIterator, getRightSideColumnCount, getRowDecorator, hasCurrent, hasNext, hasPrevious, isRightOuter, isSwapLeftAndRight, next, nextIndex, previous, previousIndex, setJoinCondition, setLeftRowIterator, setRightOuter, setRightSideColumnCount, setSwapLeftAndRight
 
Methods inherited from class org.axiondb.engine.rowiterators.BaseRowIterator
add, first, isEmpty, last, next, peekNext, peekPrevious, previous, remove, set, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedLoopJoinedRowIterator

public NestedLoopJoinedRowIterator(RowIterator left,
                                   RowIterator right,
                                   int rightColumnCount,
                                   boolean rightOuter,
                                   boolean swapLeftAndRight)
                            throws AxionException
Throws:
AxionException

NestedLoopJoinedRowIterator

public NestedLoopJoinedRowIterator(RowIterator left,
                                   RowIterator right,
                                   int rightColumnCount)
                            throws AxionException
Throws:
AxionException
Method Detail

generateRightRowIterator

protected RowIterator generateRightRowIterator()
                                        throws AxionException
Specified by:
generateRightRowIterator in class AbstractJoinedRowIterator
Throws:
AxionException

reset

public void reset()
           throws AxionException
Description copied from interface: RowIterator
Re-initialize this RowIterator to its initial state (positioned just before the first Rowin the list).

Specified by:
reset in interface RowIterator
Overrides:
reset in class AbstractJoinedRowIterator
Throws:
AxionException

toString

public java.lang.String toString()
Overrides:
toString in class AbstractJoinedRowIterator