Jump to content

Auto_Increment, how do i fix it's next index ?!


shlomikalfa

Recommended Posts

hello there.

 

whenever i delete somethin in my table the auto_increment seems to just move on as if nothing had happend and i'd like it to fix it's own index to the new next index so that there won't be gaps in my table... is there any MYSQL command that does that ?!

 

please help. [move]thanks in advance![/move]

 

MySQL version: MySQL4.0

Table Type: MYISAM

Link to comment
Share on other sites

there is no way to have the table's indexes automatically fixed ?!

also what about the fixing the automatic increment ? how can i have a table with 53 rows in it and next auto_increment is 63 ?! where did the other 10 went to ?!

 

Row Statistics: 
Statements 	Value
Format 	dynamic
Rows 	53
Row length ø 	1,048
Row size  ø 	1,087 Bytes
Next Autoindex 	63
Creation 	Dec 02, 2007 at 04:33 PM
Last update 	Dec 05, 2007 at 01:32 AM
Last check 	Dec 05, 2007 at 02:23 AM

Link to comment
Share on other sites

there is no way to have the table's indexes automatically fixed ?!

It's not broken, there's nothing to fix -- you had rows there with the UIDs in between, then you deleted them... so what?  Leave this number alone, nothing outside the application should ever see it, and you should never be exposing it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.