Re: Re: Create unique non-autoincrement key for 700,000 records?
| From: | Robert Cummings | Date: | Wed, 17 Dec 2008 02:23:02 +0000 |
| Subject: | Re: Re: Create unique non-autoincrement key for 700,000 records? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284711@lists.php.net to get a copy of this message | ||
On Wed, 2008-12-17 at 02:03 +0100, Jochem Maas wrote:
>
> or just:
>
> mysql_query("UPDATE test SET mykey=UUID()");
>
> can't see any reason to go down the 'loop the dataset and roll your
> own much less random, much more likely to collide, unique value' road.
Not terribly random:
7e55a4d0-1d31-102c-8104-001fd05507bc
7e8e9ed4-1d31-102c-8104-001fd05507bc
7ec56be4-1d31-102c-8104-001fd05507bc
7efbb50a-1d31-102c-8104-001fd05507bc
7f339bf0-1d31-102c-8104-001fd05507bc
But it's about as good as what has already come up :) I haven't come
accross UUID() before. It looks time based to me.
> sometimes less is more (although oddly more is never less ;-)
What about when more is black holes?
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP