Advertisement

04.24.2008 at 04:55AM PDT, ID: 23349886
[x]
Attachment Details

auto_increment and INSERT/DELETE problem

Asked by wilq32 in MySQL

Tags: MySQL, auto_increment

I got a little problem and I hope that you, experienced designers, might help me out with it. I have a dynamic table with ID lets say TINYINT. Content of this database is changed offenly (INSERT / DELETE) and I would like to have ability to INSERT very fast. So normally I use auto_increment to make sure that every next INSERT will place item with next ID. It's working OK, but... but if i INSERT 5 rows and DELETE 5 rows, next time I use INSERT I get id=5. So as you see after around 255 INSERTS and DELETES I cant add anything new even if mine table is empty (or half-empty etc.). My question is: how you prevent this problems? Its not an option to use very large ID's in this case Start Free Trial
[+][-]04.24.2008 at 05:06AM PDT, ID: 21429858

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 06:16AM PDT, ID: 21430436

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MySQL
Tags: MySQL, auto_increment
Sign Up Now!
Solution Provided By: cedlinx
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906