On Thu, 29 May 2008, Graeme Geldenhuys wrote:
> Hi, > > I'm trying to do performance testing in Firebird RDBMS using GUID's > and primary keys. I constantly got PK violations. I then wrote the > code show below to create 50,000 GUID's and add them to a StringList > (no duplicates allowed). Every time I run this I get a duplicate GUID > at iteration 1021. My original test is supposed to create 5mil > records, but I can't get past 1000! :-( As a short workaround: The default implementation on Linux uses a random() call to generate a guid, combined with a timestamp, if I recall correctly. You can use the kernel mechanism by inluding libuuid in your uses clause. That should ensure uniqueness. Michael. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel