nobodyk Posted April 17, 2010 Share Posted April 17, 2010 I just want to know what's more efficient for my site. I have a table with appropriately 100k rows of data. Each row represents one image. The primary key is on auto increment. The way I do things right now is that if I remove an image I update the row and set the attribute 'status' to removed. I don't delete the row. My question is should I remove the row instead and have fragmented rows? or should I keep everything organized and leave the row in there. Any advice? I'm getting about 100 new pics a day, and with time and popularity it will grow to millions. Quote Link to comment https://forums.phpfreaks.com/topic/198870-simple-question-about-tables-and-rows/ Share on other sites More sharing options...
trq Posted April 17, 2010 Share Posted April 17, 2010 Do you need to keep a record of a deleted image? If not, then delete them. Quote Link to comment https://forums.phpfreaks.com/topic/198870-simple-question-about-tables-and-rows/#findComment-1043965 Share on other sites More sharing options...
F1Fan Posted April 18, 2010 Share Posted April 18, 2010 I agree completely. It would be far better to have a lot fewer rows than to not have any auto-increment fragmentation. I don't even think the fragmentation would make any difference at all, but I'm no DBA. Quote Link to comment https://forums.phpfreaks.com/topic/198870-simple-question-about-tables-and-rows/#findComment-1043996 Share on other sites More sharing options...
fenway Posted April 18, 2010 Share Posted April 18, 2010 Do you need to keep a record of a deleted image? If not, then delete them. I always use the equivalent of an activity column on every table that contains client data -- I can always backup or archive off-line. Quote Link to comment https://forums.phpfreaks.com/topic/198870-simple-question-about-tables-and-rows/#findComment-1044108 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.