o begin //combStr := //combstr := copy(combstr,21,32)+copy(combstr,1,20); ADOCommand1.Parameters[0].Value := SSystem.GetGuidString2(SSystem.GetCombGUID(),'''''''','''''''','''''''');; ADOCommand1.Parameters[1].Value := i/7; ADOCommand1.Execute; end; end; procedure TForm1.InsertGuid(cc : integer); var i : integer; guid : TGUID; begin ADOCommand1.CommandText :=''''Insert into TGuid(PGuid,NInt) values(:PGuid,:NInt)''''; ADOCommand1.Prepared := true; For i:= 0 to cc-1 do begin CoCreateGUID(guid); ADOCommand1.Parameters[0].Value := SSystem.GetGuidString(guid,'''''''','''''''',''''''''); ADOCommand1.Parameters[1].Value := i/7; ADOCommand1.Execute; end; end; procedure TForm1.insertInt(cc : integer); var i : integer; begin ADOCommand1.CommandText :=''''Insert into TInteger(NInt) values(:NInt)''''; ADOCommand1.Prepared := true; For i:= 0 to cc-1 do begin ADOCommand1.Parameters[0].Value := i/7; ADOCommand1.Execute; end; end; procedure TForm1.Button2Click(Sender: TObject); var TotalTime : Cardinal; begin TotalTime := GetTickCount; ADOCommand1.CommandText :=''''select count(*) as ttc from TInteger''''; ADOCommand1.Execute; TotalTime := GetTickCount - TotalTime; Label3.Caption := inttostr(TotalTime); TotalTime := GetTickCount; ADOCommand1.CommandText :=''''select count(*) as ttc from TGuid''''; ADOCommand1.Execute; TotalTime := GetTickCount - TotalTime; Label5.Caption := inttostr(TotalTime); TotalTime := GetTickCount; ADOCommand1.CommandText :=''''select count(*) as ttc from Tcomb''''; ADOCommand1.Execute; TotalTime := GetTickCount - TotalTime; Label7.Caption := inttostr(TotalTime); TotalTime := GetTickCount; ADOCommand1.CommandText :=''''s 上一页 [1] [2] [3] [4] 下一页 [VB.NET程序]Read a byte, integer or long from memory [VB.NET程序]源代码推荐:vb的GUID生成算法 [Delphi程序]在Delphi中通过函数获取GUID [Delphi程序]Integer GUID和Comb做主键的效率测试(Delphi+acce… [Delphi程序]Integer GUID和Comb做主键的效率测试(Delphi+acce…
|