[OT] Mysql

Riccardo Torrini riccardo a torrini.org
Lun 19 Maggio 2008 14:56:03 CEST

On Mon, May 19, 2008 at 02:52:18PM +0200, Riccardo Torrini wrote:

> Ovviamente ha un impatto sulle performance devastante
> (mentre ottimizza), quindi non va usato a casaccio...


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, VARBINARY, BLOB,
or TEXT columns). Deleted rows are maintained in a linked list and
subsequent INSERT operations reuse old row positions. You can use
OPTIMIZE TABLE to reclaim the unused space and to defragment the
data file.

This statement requires SELECT and INSERT privileges for the table.

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


Riccardo. ( http://www.GUFI.org/~vic/ )

Maggiori informazioni sulla lista Esperti