| org.h2.index.BaseIndex org.h2.index.BtreeIndex
BtreeIndex | public class BtreeIndex extends BaseIndex implements RecordReader(Code) | | This is the most common type of index, a b tree index.
The index structure is:
- There is one
BtreeHead that points to the root page.
The head always stays where it is.
- There is a number of
BtreePage s. Each page is either
a
BtreeNode or a
BtreeLeaf .
- A node page links to other leaf pages or to node pages.
Leaf pages don't point to other pages (but may have a parent).
- The uppermost page is the root page. If pages
are added or deleted, the root page may change.
Only the data of the indexed columns are stored in the index.
|
Method Summary | |
public void | add(Session session, Row r) | void | addPage(Session session, Record p) | public boolean | canFindNext() | public boolean | canGetFirstOrLast() | public void | checkRename() | public void | close(Session session) | void | deletePage(Session session, Record p) | public Cursor | find(Session session, SearchRow first, SearchRow last) | public SearchRow | findFirstOrLast(Session session, boolean first) | public Cursor | findNext(Session session, SearchRow first, SearchRow last) | public void | flush(Session session) | public double | getCost(Session session, int[] masks) | public int | getHeadPos() | public long | getLastChange() | public int | getLookupCost(int rowCount) | public BtreePage | getPage(Session session, int i) | public int | getRecordOverhead() | public Row | getRow(Session session, int pos) | SearchRow | getSearchRow(Row row) | public boolean | needRebuild() | public Record | read(Session session, DataPage s) | ObjectArray | readRowArray(DataPage s) | public void | remove(Session session) | public void | remove(Session session, Row row) | public void | truncate(Session session) | void | updatePage(Session session, Record p) |
canFindNext | public boolean canFindNext()(Code) | | |
canGetFirstOrLast | public boolean canGetFirstOrLast()(Code) | | |
getHeadPos | public int getHeadPos()(Code) | | |
getLastChange | public long getLastChange()(Code) | | |
getLookupCost | public int getLookupCost(int rowCount)(Code) | | |
getRecordOverhead | public int getRecordOverhead()(Code) | | |
needRebuild | public boolean needRebuild()(Code) | | |
Methods inherited from org.h2.index.BaseIndex | abstract public void add(Session session, Row row) throws SQLException(Code)(Java Doc) public boolean canFindNext()(Code)(Java Doc) abstract public boolean canGetFirstOrLast()(Code)(Java Doc) abstract public void close(Session session) throws SQLException(Code)(Java Doc) public void commit(int operation, Row row) throws SQLException(Code)(Java Doc) public int compareKeys(SearchRow rowData, SearchRow compare)(Code)(Java Doc) public int compareRows(SearchRow rowData, SearchRow compare) throws SQLException(Code)(Java Doc) abstract public Cursor find(Session session, SearchRow first, SearchRow last) throws SQLException(Code)(Java Doc) abstract public SearchRow findFirstOrLast(Session session, boolean first) throws SQLException(Code)(Java Doc) public Cursor findNext(Session session, SearchRow first, SearchRow last) throws SQLException(Code)(Java Doc) public int getColumnIndex(Column col)(Code)(Java Doc) public String getColumnListSQL()(Code)(Java Doc) public Column[] getColumns()(Code)(Java Doc) abstract public double getCost(Session session, int[] masks) throws SQLException(Code)(Java Doc) public long getCostRangeIndex(int[] masks, long rowCount) throws SQLException(Code)(Java Doc) public String getCreateSQL()(Code)(Java Doc) public String getCreateSQLForCopy(Table table, String quotedName)(Code)(Java Doc) public String getDropSQL()(Code)(Java Doc) public SQLException getDuplicateKeyException()(Code)(Java Doc) public IndexColumn[] getIndexColumns()(Code)(Java Doc) public IndexType getIndexType()(Code)(Java Doc) public int getLookupCost(long rowCount)(Code)(Java Doc) public String getPlanSQL()(Code)(Java Doc) public long getRowCount(Session session)(Code)(Java Doc) public Table getTable()(Code)(Java Doc) public int getType()(Code)(Java Doc) public boolean isNull(Row newRow)(Code)(Java Doc) abstract public boolean needRebuild()(Code)(Java Doc) abstract public void remove(Session session, Row row) throws SQLException(Code)(Java Doc) abstract public void remove(Session session) throws SQLException(Code)(Java Doc) public void removeChildrenAndResources(Session session) throws SQLException(Code)(Java Doc) abstract public void truncate(Session session) throws SQLException(Code)(Java Doc)
|
|
|