Skip to main content

MySQL, high number of fragment tables. Safe to optimize all?

Comments

7 comments

  • jols
    By the way, here's the contents of my.cnf ----------------------------------------------------------------------- # The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 socket = /var/lib/mysql/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock skip-external-locking key_buffer_size = 384M max_allowed_packet = 32M table_open_cache = 5096 sort_buffer_size = 2M read_buffer_size = 2M read_rnd_buffer_size = 8M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size = 128M query_cache_limit = 16M join_buffer_size = 384K tmp_table_size = 32M max_heap_table_size = 32M table_cache = 6024 # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 max_connections = 400 log-slow-queries local-infile=0 innodb_file_per_table=1 tmpdir=/mysqltmp server-id = 1 innodb_buffer_pool_size = 2G open_files_limit=50000 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates [myisamchk] key_buffer_size = 256M sort_buffer_size = 256M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout
    ----------------------------------------------------------------------- ----------------------------------------------------------------------- And here's the report from mysqltuner.pl >> MySQLTuner 1.2.0_1 - Major Hayden >> Bug reports, feature requests, and downloads at
    0
  • 24x7server
    Hello, Yes, You can run the this command on your server through SHELL, It will repair and optimize your all database [QUOTE]mysqlcheck -u root -p --auto-repair --check --optimize --all-databases
    0
  • jols
    Hi. Thanks, yup, but is it totally safe to run on a highly active server chock full of databases?
    0
  • cPanelMichael
    Hello :) I recommend using the MySQL tuner after MySQL has been running for at least 24 hours. The output you pasted shows it was only up for 22 minutes when the tuner was ran. As for your other question, repairing and optimizing database tables is generally a safe operation. Thank you.
    0
  • Archmactrix
    You should probably omit --check from the command as the --auto-repair option uses check automatically.
    0
  • pdelteil
    [quote="Archmactrix, post: 1457042">You should probably omit --check from the command as the --auto-repair option uses check automatically.
    You can't run the command with the --check and --auto-repair options at the same time. It gives this error: Error: mysqlcheck doesn't support multiple contradicting commands.
    0
  • Archmactrix
    [quote="pdelteil, post: 1756811">You can't run the command with the --check and --auto-repair options at the same time. It gives this error: Error: mysqlcheck doesn't support multiple contradicting commands.
    Yes, and you really don't need to specify the --check option as it is the default operator.
    0

Please sign in to leave a comment.