simpledb.metadata
Class StatMgr

java.lang.Object
  extended by simpledb.metadata.StatMgr

 class StatMgr
extends java.lang.Object

The statistics manager, which is responsible for keeping statistical information about each table. The manager does not store this information in the database. Instead, it calculates this information on system startup, and periodically refreshes it.

Author:
Edward Sciore

Constructor Summary
StatMgr(TableMgr tblMgr, Transaction tx)
          Creates the statistics manager.
 
Method Summary
 StatInfo getStatInfo(java.lang.String tblname, TableInfo ti, Transaction tx)
          Returns the statistical information about the specified table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatMgr

public StatMgr(TableMgr tblMgr,
               Transaction tx)
Creates the statistics manager. The initial statistics are calculated by traversing the entire database.

Parameters:
tx - the startup transaction
Method Detail

getStatInfo

public StatInfo getStatInfo(java.lang.String tblname,
                            TableInfo ti,
                            Transaction tx)
Returns the statistical information about the specified table.

Parameters:
tblname - the name of the table
ti - the table's metadata
tx - the calling transaction
Returns:
the statistical information about the table