MySQL Forums
Forum List  »  MyISAM

Re: Implement a queue with a table - how?
Posted by: Rick James
Date: September 18, 2009 08:33AM

ALTER TABLE MODIFY COLUMN id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL;
That way you can't run out of ids (at least not in your lifetime), and they will continue to be bigger.

Caution: If you have 4G rows (still) in the table, the ALTER will take hours. If you have deleted as you went, and the table has few rows, the ALTER will clean it up.

Options: ReplyQuote


Subject
Views
Written By
Posted
6602
September 17, 2009 02:55AM
Re: Implement a queue with a table - how?
2982
September 18, 2009 08:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.