Navigation

Search

smf_db_optimize_table

Description

Attempts to optimize the specified table

Syntax

mixed smf_db_optimize_table (string $table)



Parameter $table

Expected type: String
Description: The name of the table to optimize



Return value

Expected type: Mixed
Description:

Possible types
Allowed values Description
Integer -1 if there was an error or 0 if no data was optimized
Double Precision The amount of data that was freed up, in kilobytes ($row['data_Free'] / 1024)


Notes

  • Sends an "OPTIMIZE TABLE $table" query to MySQL via $smfFunc['db_query']
  • Uses $smfFunc['db_fetch_assoc'] to get the results from MySQL
  • Looks at the 'data_Free' result column to determine how much was optimized
  • See http://dev.mysql.com/doc/mysql/en/OPTIMIZE_TABLE.html for more information
View all versions of this function