Just nu i M3-nätverket
Jump to content



Recommended Posts

När poster/rader raderas i en tabell så blir det kvar "tomt mellanrum" mellan de andra raderna (inte helt sant).


OPTIMIZE TABLE defragmenterar tabelldata, och återställer tabellerna. Det bör användas om tabellen utsätts för många uppdateringar och postborttagningar.


Enligt MySQL-dokumentationen:

OPTIMIZE TABLE should be used if you have deleted a large part of a table or if you have made many changes to a table with variable-length rows (tables that have VARCHAR, BLOB, or TEXT columns). Deleted records are maintained in a linked list and subsequent INSERT operations reuse old record positions. You can use OPTIMIZE TABLE to reclaim the unused space and to defragment the data file.


In most setups, you need not run OPTIMIZE TABLE at all. Even if you do a lot of updates to variable-length rows, it's not likely that you need to do this more than once a week or month and only on certain tables.






TicoRoman - Anfall är bästa försvar


Link to comment
Share on other sites


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

  • Create New...