For Sakai database the largest table is CONTENT_RESOURCE_BODY_BINARY.MYIOPTIMIZE TABLEshould 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 haveVARCHAR,VARBINARY,BLOB, orTEXTcolumns).
It keeps all files uploaded to Resources Tool. After deleting some files from Resources this table might be fragmented. To optimize its internal structure it's possible to use a mysql command:
optimize table CONTENT_RESOURCE_BODY_BINARY;or mysql utility:
myisamchk -r --sort-index --analyze \Option -o (--safe-recover) instead of -r should be used if there is an error:
CONTENT_RESOURCE_BODY_BINARY.MYI
myisamchk: error: sort_buffer_size is to small