Integer GUID和Comb做主键的效率测试(Delphi+access)(一)[10]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

   end

   else begin

      raise Exception.Create('Create GUID Err!');

   end;

end;

 

class function SSystem.GetCombGUID(guid: TGUID): TGUID;

var

  dtm : TDateTime;

  days,seconds,tmp : longint;//32 bit

begin

   dtm := Now();

   dtm := dtm - spdelib_base_datetime;

   days := trunc(dtm);

   //应该*1000000000(100),但这样会可能发生溢出

   //如果采用int64,则会给下面的移位转换带来麻烦

   //所以这里采用了1000000000(90)

本文关键:Integer GUID和Comb做主键的效率测试(Delphi+access)(一)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top