soltek Posted October 19, 2011 Share Posted October 19, 2011 Hey there, I just noticed that my auto_increment of the new entries is... well, backwards. Like: ID 1 2 3 4 17 16 15 14 13 12 [...] You know what I mean? If I add another entry, whose ID value would be 18, it would be added not to the end of the table, but after the forth, instead. Do you know how to fix it? I think it may harm the performance. Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/249387-auto_increment-backwards/ Share on other sites More sharing options...
AyKay47 Posted October 19, 2011 Share Posted October 19, 2011 how di the id of 17 get after 4? Quote Link to comment https://forums.phpfreaks.com/topic/249387-auto_increment-backwards/#findComment-1280485 Share on other sites More sharing options...
soltek Posted October 19, 2011 Author Share Posted October 19, 2011 how di the id of 17 get after 4? That's a pretty good question, my friend Quote Link to comment https://forums.phpfreaks.com/topic/249387-auto_increment-backwards/#findComment-1280487 Share on other sites More sharing options...
AyKay47 Posted October 19, 2011 Share Posted October 19, 2011 can you post your table credentials please.. Quote Link to comment https://forums.phpfreaks.com/topic/249387-auto_increment-backwards/#findComment-1280488 Share on other sites More sharing options...
fenway Posted October 19, 2011 Share Posted October 19, 2011 There is no "order" to records. That simply means you've deleted some along the way. This isn't a real problem -- don't pretend that it is. There's an ORDER BY clause to deal with ordering. But you should never be relying on the auto-increment for ordering anyway, since it's a magic number that you don't control. Quote Link to comment https://forums.phpfreaks.com/topic/249387-auto_increment-backwards/#findComment-1280497 Share on other sites More sharing options...
soltek Posted October 19, 2011 Author Share Posted October 19, 2011 Got you. I thought something was wrong because it doesnt use to look like that. It uses to be 1 2 3 4 14 15 17, nor 1 2 3 4 17 16 15 14. I had the idea that this would affect the performance, but I guess not. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/249387-auto_increment-backwards/#findComment-1280508 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.