vineld Posted July 8, 2009 Share Posted July 8, 2009 I just copied a table in my database by exporting it and then simply replacing the table name before running the exported sql. I was surprised to see that the new table was maybe 5-6% smaller in total size (the rows and indices are the same) than the original one. Is there a chance of some data being lost? If so, is there any easy way that I can check this without checking every single value with a php script? Link to comment https://forums.phpfreaks.com/topic/165277-solved-copying-table-loss-of-data/ Share on other sites More sharing options...
vineld Posted July 9, 2009 Author Share Posted July 9, 2009 I decided to compare every value of the two tables and it turned out that they are exactly the same. I am still very curious as to why there is this difference in size though. Link to comment https://forums.phpfreaks.com/topic/165277-solved-copying-table-loss-of-data/#findComment-871599 Share on other sites More sharing options...
PFMaBiSmAd Posted July 9, 2009 Share Posted July 9, 2009 When you delete rows, the empty space is left as is. If new data fits within the empty space, it is reused, but there is going to be some amount of unusable empty space in a database that has had a lot of delete operations on it. Link to comment https://forums.phpfreaks.com/topic/165277-solved-copying-table-loss-of-data/#findComment-871603 Share on other sites More sharing options...
vineld Posted July 9, 2009 Author Share Posted July 9, 2009 Thanks for the explanation. I suspected it had something to do with memory loss of some kind. Link to comment https://forums.phpfreaks.com/topic/165277-solved-copying-table-loss-of-data/#findComment-871617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.