Most databases have a built in GUID/UUID generator

http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_uuid

Just yesterday I was looking into doing the same thing. I decided against it because of the speed impact that you will have on your database.

I was talking to a friend at a large high-tech company that has terrabytes and they say that they use auto-increment for performance issues.

Good luck with whatever you decide.

Justin Giboney


On Jul 21, 2009, at 7:53 AM, Kirk Ouimet wrote:

Hi List,



Can anyone recommend a good PHP function/class to generate GUIDs? I'm
shifting from using auto-increment to using GUIDs - any advice for this type of change? Does a SQL lookup slow down using a GUID as a PK versus using an
integer as a PK?



Thanks!



Kirk Ouimet

<mailto:[email protected]> [email protected]

Cell: (801) 310-1421




_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net


_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to