SQL Server Administration, and tips for Integration Services (SSIS) and Analysis Services (SSAS)

Datos inmemory en SQL Server 2014This SQL Server eBook compile our best articles about SQL Server administration and development, including posts about Database Administration, for SQL Server DBA's, and about the Business Intelligence components of the Database, the ETL tool SQL Server Integration Services (SSIS) and the OLAP tool SQLServer Analysis Services (SSAS).


Defragment to optimize MySQL tables



In MySQL, when you delete records from a table, space is reallocated automatically. It is as empty space and forming new attachments will advantage.

The problem is that if a table perform many DELETE operations, the physical space of the table will become increasingly fragmented and the performance is reduced.

In the MyISAM and InnoDB, OPTIMIZE TABLE command available to perform an optimization on any table that, among other things, performs an automatic defragmentation of the table.

It is highly recommended to use this command regularly especially on tables that are more statements of disposal of records.

As a precaution, keep in mind that during implementation, of course, the table is blocked. You have to remember when you are going to use with large tables and busy.

Supersimples The syntax is:


OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE mi_tabla1 [, mi_tabla2] ...;

To make a fragmented table optimization can be selected to have free space, probably as a result of DELETE statements: