[Lazarus] Postgres database again...
Graeme Geldenhuys
graemeg.lists at gmail.com
Wed May 28 12:15:00 CEST 2008
2008/5/28 Graeme Geldenhuys <graemeg.lists at gmail.com>:
> 2008/5/28 Bogusław Brandys <brandys at o2.pl>:
>> "straight GUIDs (e.g. generated by Delphi written application) has their
>> significant part at the end which does not provide for optimal indexing. Use
>> of the UDF generating UUID (reverse GUID) is said to improve performance
>> over the PK dramatically.
>
> I'll try and find the code for the 'UDF generating UUID (reverse
> GUID)' and create a tiOPF OID generator for it.
Under Linux, it seems FPC gets the kernels UUID when you ask to create
a GUID via CreateGUID(). Plus the GUID/UUID returned is totally
random, to parts are the same as the previous request.
eg;
graemeg at graemeg:~$ cat /proc/sys/kernel/random/uuid
ca65c9ce-b097-4ff0-8a1a-7f41628e9982
graemeg at graemeg:~$ cat /proc/sys/kernel/random/uuid
c29650af-5562-4669-967d-5227402c0252
graemeg at graemeg:~$ cat /proc/sys/kernel/random/uuid
f757c538-70eb-4432-b094-dc3ad5b824f5
graemeg at graemeg:~$ cat /proc/sys/kernel/random/uuid
4a8dca85-2040-4fe5-afa2-dfeb5066c731
graemeg at graemeg:~$ cat /proc/sys/kernel/random/uuid
e576429b-fdf9-485a-b9f5-3319a2067b24
graemeg at graemeg:~$ cat /proc/sys/kernel/random/uuid
f7335eb4-26bc-4467-8d99-04a3ef8702fd
So I can't see the point in reversing the returned string. Maybe
Delphi or Windows works different and some parts are the same as the
previous request.
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the Lazarus
mailing list