Add a second field that is auto incremented and change the primary key to
that....
So for now you can keep the time-stamp


Thanks,

Nalaka Nanayakkara
Overwaitea Food Group
Tel: 604-888-1213 (ext 3742)

 -----Original Message-----
From:   Craig Jackson [mailto:[EMAIL PROTECTED] 
Sent:   Thursday, February 12, 2004 9:57 AM
To:     Keith C. Ivey
Cc:     [EMAIL PROTECTED]
Subject:        Re: Unique IDs

On Thu, 2004-02-12 at 11:47, Keith C. Ivey wrote:
> Craig Jackson <[EMAIL PROTECTED]> wrote:
> 
> > I have a very large web app that uses timestamp for unique IDs.
> > Everything was rolling fine until we started getting many users per
> > second, causing some of the unique IDs to not be unique -- users were
> > being assigned the same timestamp. Since the web app is so large we
> > don't want to change the method of assigning IDs as it would create a
> > major project.
> 
> I don't understand.  If you're getting many users per second, and 
> your timestamps have 1-second resolution, how could you possibly 
> solve the problem without changing the method of assigning IDs?
> Are the "many users per second" periods just short bursts, and you're 
> really only getting several hundred users per day?  If so, I guess 
> you could keep waiting a second and trying the insert again, but that 
> could lead to indefinite delays if traffic gets high.  I think you've 
> got to bite the bullet and change the unique ID to something that's 
> actually unique -- even an AUTO_INCREMENT would work.

Thanks for the speedy reply and I have already recommended
auto_increment for the solution. We do need that quick fix until the
problem is fixed. How would I go about making Mysql wait one second
between inserts. We only get about 1000 hits per day, but they tend to
be concentrated in short time intervals.


> 
> -- 
> Keith C. Ivey <[EMAIL PROTECTED]>
> Tobacco Documents Online
> http://tobaccodocuments.org


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-------------
Note:  This message is only intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, confidential and 
exempt from disclosure.  If the reader of this message is not the intended recipient, 
or an employee or agent responsible for delivering the message to the intended 
recipient, you are hereby notified that any dissemination, distribution, or copying of 
this communication is strictly prohibited.  If you have received this communication in 
error, please notify us by telephone (604-888-2079) or electronically by return 
message, and delete or destroy all copies of this communication.  Thank you.

Reply via email to