Hello,
I've used mysqltuner.pl to see how I could improve my database, and it reports "[!!] Total fragmented tables: 125."
I first tried to defragment the tables for optimize performances with the OPTIMIZE command, which returns the error "Table does not support optimize, doing recreate + analyze instead"
So I tried with the ALTER TABLE mytable ENGINE="INNODB" command, but not better, when I the mysqltuner.pl again it remains 125 fragmented tables.
What can I do to defragment those tables ?
Mysqltuner report :
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.69-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 2K (Tables: 3)
[--] Data in InnoDB tables: 130M (Tables: 125)
[!!] Total fragmented tables: 125
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 2m 29s (1K q [9.054 qps], 24 conn, TX: 2M, RX: 1M)
[--] Reads / Writes: 97% / 3%
[--] Total buffers: 314.0M global + 2.9M per thread (151 max threads)
[OK] Maximum possible memory usage: 748.1M (39% of installed RAM)
[OK] Slow queries: 0% (0/1K)
[OK] Highest usage of available connections: 1% (2/151)
[OK] Key buffer size / total MyISAM indexes: 8.0M/97.0K
[OK] Key buffer hit rate: 100.0% (2K cached / 0 reads)
[OK] Query cache efficiency: 45.0% (566 cached / 1K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 112 sorts)
[!!] Joins performed without indexes: 31
[OK] Temporary tables created on disk: 18% (71 on disk / 392 total)
[OK] Thread cache hit rate: 91% (2 created / 24 connections)
[OK] Table cache hit rate: 83% (35 open / 42 opened)
[OK] Open file limit used: 1% (17/1K)
[OK] Table locks acquired immediately: 100% (1K immediate / 1K locks)
[!!] Connections aborted: 8%
[OK] InnoDB data size / buffer pool: 130.4M/256.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Adjust your join queries to always utilize indexes
Your applications are not closing MySQL connections properly
Variables to adjust:
join_buffer_size (> 256.0K, or always use indexes with joins)
I've used mysqltuner.pl to see how I could improve my database, and it reports "[!!] Total fragmented tables: 125."
I first tried to defragment the tables for optimize performances with the OPTIMIZE command, which returns the error "Table does not support optimize, doing recreate + analyze instead"
So I tried with the ALTER TABLE mytable ENGINE="INNODB" command, but not better, when I the mysqltuner.pl again it remains 125 fragmented tables.
What can I do to defragment those tables ?
Mysqltuner report :
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.69-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 2K (Tables: 3)
[--] Data in InnoDB tables: 130M (Tables: 125)
[!!] Total fragmented tables: 125
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 2m 29s (1K q [9.054 qps], 24 conn, TX: 2M, RX: 1M)
[--] Reads / Writes: 97% / 3%
[--] Total buffers: 314.0M global + 2.9M per thread (151 max threads)
[OK] Maximum possible memory usage: 748.1M (39% of installed RAM)
[OK] Slow queries: 0% (0/1K)
[OK] Highest usage of available connections: 1% (2/151)
[OK] Key buffer size / total MyISAM indexes: 8.0M/97.0K
[OK] Key buffer hit rate: 100.0% (2K cached / 0 reads)
[OK] Query cache efficiency: 45.0% (566 cached / 1K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 112 sorts)
[!!] Joins performed without indexes: 31
[OK] Temporary tables created on disk: 18% (71 on disk / 392 total)
[OK] Thread cache hit rate: 91% (2 created / 24 connections)
[OK] Table cache hit rate: 83% (35 open / 42 opened)
[OK] Open file limit used: 1% (17/1K)
[OK] Table locks acquired immediately: 100% (1K immediate / 1K locks)
[!!] Connections aborted: 8%
[OK] InnoDB data size / buffer pool: 130.4M/256.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Adjust your join queries to always utilize indexes
Your applications are not closing MySQL connections properly
Variables to adjust:
join_buffer_size (> 256.0K, or always use indexes with joins)