5 Dec
2005
5 Dec
'05
10:21 a.m.
Has it ever been discussed to run a query to optimize some of the more active tables in MySQL during cron.php runs? For example 'OPTIMIZE TABLE watchdog;'
OPTIMIZE TABLE is a MySQL-ism; it's not ANSI SQL. That's true, but from the currently summorted databases postgress carries out automatic optimisations, mysql accepts OPTIMIZE.
Can't we make an db_optimize() abstraction function, with mysql backend using OPTIMIZE TABLE, the default other doing nothing, and if more backends are added they will be resposible for doing something else than nothing.
This could be added in a conditional structure to dba.module maybe. Vlado