コード例 #1
0
ファイル: IndexInfo.cs プロジェクト: water160/test_dbms
//---------------------------------------------------------------------------------------
        public IndexInfo(string idxname, string tblname, string fldname, Transaction tx)
        {
            this.idxname = idxname;
            this.fldname = fldname;
            this.tx      = tx;
            ti           = SimpleDB.mdMgr().getTableInfo(tblname, tx);
            si           = SimpleDB.mdMgr().getStatInfo(tblname, ti, tx);
        }
コード例 #2
0
 private void refreshStatistics(Transaction tx)
 {
     lock (threadLock)
     {
         tablestats = new Dictionary <string, StatInfo>();
         numcalls   = 0;
         TableInfo  tcatmd   = tblMgr.getTableInfo("tblcat", tx); //获取tblcat表中的信息
         RecordFile tcatfile = new RecordFile(tcatmd, tx);        //利用这些信息新建一个RecordFile读取类
         while (tcatfile.next())
         {                                                        //获取每一张表的字段信息,计算出块数和记录数,添加到统计信息管理器中去
             string    tblname = tcatfile.getString("tblname");
             TableInfo md      = tblMgr.getTableInfo(tblname, tx);
             StatInfo  si      = calcTableStats(md, tx);
             tablestats.Add(tblname, si);
         }
         tcatfile.close();
     }
 }