The quiz and exercises are provided to help you solidify your understanding of the material covered today. Try to understand the quiz and exercise answers before continuing to tomorrow's lesson.
1: | |
A1: | False. myisamchk can also be used to optimize tables. It can reclaim wasted space and re-sort indexes and data records. |
2: | What is the SQL command for repairing a table? |
A2: | REPAIR TABLE |
1: | Write a myisamchk command that performs a table repair that attempts to fix indexes only. |
A1: | You should have this:
myisamchk -r -q table_name or this: myisamchk --recover --quick table_name |
2: | Write a myisamchk command that performs a table repair that attempts to fix indexes and data files. |
A2: | You should have this:
myisamchk -r table_name or this: myisamchk --recover table_name
|
3: | Write a myisamchk command that reveals how much wasted space you have in a table. |
A3: | You should have this:
myisamchk table_name |
4: | Write a myisamchk command that optimizes all tables in all databases on your server. It should recover wasted space and sort indexes. (Assume that your data is in /usr/local/mysql/var/.) |
A4: | You should have this:
myisamchk -r -S /usr/local/mysql/var/*/* or this: myisamchk --recover --sort-index /usr/local/mysql/var/*/* |
3.135.188.121