Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (20.3k points)

MySQL has an OPTIMIZE TABLE command which can be used to reclaim unused space in a MySQL install. Is there a way (built-in command or common stored procedure) to run this optimization for every table in the database and/or server install, or is this something you'd have to script up yourself?

1 Answer

0 votes
by (40.4k points)

Try using mysqlcheck, at the command line to run the optimization table for every table in database and to install the server .

At one database:

mysqlcheck -o <db_schema_name>

At all databases:

mysqlcheck -o --all-databases

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jan 2 in SQL by Appu (6.1k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...