Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

221
Vistas
Why mysql table info shows data free only 5 MB but optimize table reduced table size from 800GB to 1 GB?

My question is purely about mysql. I have a wordpress application. My application database has a table named wp_options which grows very fast. This is a InnoDB table. My table size grew to 800 GB while mysqldump of table was less than 1 GB. This made me suspicious that table is fragmented due to frequent delete and updates. When I ran "optimize table" it reduced the size of table to 1 GB so my analysis also seemed to be correct.

My problem is with table info. Table info showed that 'Data length' was 800GB and 'Data free' was only 5 MB. As per mysql Table info there was no fragmentation. The result of following query was also similar -

select ENGINE, TABLE_NAME,Round( DATA_LENGTH/1024/1024) as data_length , round(INDEX_LENGTH/1024/1024) as index_length, round(DATA_FREE/ 1024/1024) as data_free from information_schema.tables  where  DATA_FREE > 0 and TABLE_NAME='wp_options';

ENGINE, TABLE_NAME, data_length, index_length, data_free 'InnoDB', 'wp_options','812128','2','5'

does it mean Table info is misleading and incorrect here? If yes then how does one really know if table is fragmented?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda