The Little Guy Posted April 26, 2008 Share Posted April 26, 2008 Can I get an explanation on this please? I can't find a good one on google. All I know is that OPTIMIZING tables removes the overhead, and I guess that is a good thing. Link to comment https://forums.phpfreaks.com/topic/103027-overhead/ Share on other sites More sharing options...
LemonInflux Posted April 26, 2008 Share Posted April 26, 2008 As you update and delete rows in your database, it builds up overhead. Think of it like using a car. You can use it for so long, then it needs servicing. That's what optimizing is. Overhead is the build up of...well, rubbish, I suppose. That's how I always think of it :/ Link to comment https://forums.phpfreaks.com/topic/103027-overhead/#findComment-527724 Share on other sites More sharing options...
The Little Guy Posted April 26, 2008 Author Share Posted April 26, 2008 if you delete it, what builds up? Link to comment https://forums.phpfreaks.com/topic/103027-overhead/#findComment-527732 Share on other sites More sharing options...
PFMaBiSmAd Posted April 26, 2008 Share Posted April 26, 2008 When information is deleted or updated with data using smaller amount of storage, this leaves gaps in the table. The database storage engine maintains a table of the empty gaps and attempts to reuse them when new information is added. The "overhead" of finding an unused space of the necessary size and using it takes extra time. By optimizing the table (defragmenting it), the unused gaps are removed, so the storage engine does not spend the extra time trying to fill them with new data. Also, the more entries there are in the table of the empty gaps, the longer it can take to scan that table to find an appropriate entry to reuse. Link to comment https://forums.phpfreaks.com/topic/103027-overhead/#findComment-527736 Share on other sites More sharing options...
The Little Guy Posted April 26, 2008 Author Share Posted April 26, 2008 I have a database that gets changed lots there is an average of 3,449,640 queries/day (mainly SELECT). Would it be a good idea, to have a SQL cron job that optimizes the tables every night for all the tables that have 500K+ overhead? Link to comment https://forums.phpfreaks.com/topic/103027-overhead/#findComment-527742 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.