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

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.