I run a small site where I use GUID's along side auto_increment id's.
The GUID is only used by the browser or client and the php uses the real id.

http://72.8.94.16/user/addMember/index.html
Look at the code for the state select box, the values are really hashed numbers.
I am able to turn the hash back into a number because I just use the
mysql AES_ENCRYPT / AES_DECRYPT methods.
I have the hash list cached so I do not run the encryption queries on
every page load.
I still look up the state by its auto_increment id in the states table.

I would like feedback on whether this is a good idea or not.

Kirk Cerny

On Tue, Jul 21, 2009 at 9:10 AM, Justin Giboney<[email protected]> wrote:
> 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
>

_______________________________________________

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

Reply via email to