Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71996 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78133 invoked from network); 2 Feb 2014 13:11:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2014 13:11:31 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.204 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.204 mail4.serversure.net Linux 2.6 Received: from [217.147.176.204] ([217.147.176.204:35576] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/BA-30967-2044EE25 for ; Sun, 02 Feb 2014 08:11:31 -0500 Received: (qmail 15861 invoked by uid 89); 2 Feb 2014 13:11:27 -0000 Received: by simscan 1.3.1 ppid: 15855, pid: 15858, t: 0.0595s scanners: attach: 1.3.1 clamav: 0.96/m:52 Received: from unknown (HELO linux-dev4.lsces.org.uk) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 2 Feb 2014 13:11:27 -0000 Message-ID: <52EE44A0.6060909@lsces.co.uk> Date: Sun, 02 Feb 2014 13:14:08 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Extending uniqid() or not? From: lester@lsces.co.uk (Lester Caine) Yasuo Ohgaki wrote: > P.S. Is anyone working UUID? PostgreSQL is using OSSP's UUID lib, it's good > for PHP. > http://www.postgresql.org/docs/9.2/interactive/uuid-ossp.html Yasuo ... Stas has pointed out that there are other options, but it's probably worth flagging an important point here in relation to unique identifiers and databases. UUID can be something of a millstone, and may not actually be necessary. Certainly storing a non-optimised UUID can create a bottleneck if it's structure makes indexing it 'distorted'. Certainly on Firebird the UUID functions can be selected to produce an better spread of keys when producing the indexes. However it is still not 'ideal' at creating a unique ID anyway, and simply using a much more efficient 'SEQUENCE' ( in Firebird these are caller generators and have recently been updated to BIGINT hence my interest in the under the hood 64bit stuff elsewhere! ) and combine that with a machine related unique id if necessary. While MAC address should be unique it can be overridden and often is to get around MAC related licence limits ... not that we would condone that. There is a nice paper on this on the Firebird site, but I can't locate it at the moment. Don't you just love 'google' as a site search tool :( -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk