static void SyncLoadTpccTablesInto(VersionDb versionDb, string dir) { // foreach (var t in TpccTable.allTypes) // { // SyncLoadTpccTable(TpccTable.Instance(t), versionDb, dir); // } Parallel.ForEach( TpccTable.AllUsedTypes, t => SyncLoadTpccTable(TpccTable.Instance(t), versionDb, dir)); }
public override int SaveTo(VersionDb versionDb) { CreateTable(versionDb, TpccTable.Instance(TableType.CUSTOMER_INDEX)); int recordCount = 0; SyncExecution txExec = new SyncExecution(versionDb); foreach (var kv in this.tempStore) { CustomerLastNameIndexKey lastNameKey = kv.Key; List <uint> cids = kv.Value; txExec.Start(); txExec.Insert( lastNameKey, CustomerLastNamePayloads.FromList(cids)); txExec.Commit(); ++recordCount; } return(recordCount); }