JavaScript Editor Javascript source editor     Web programming 



Team LiB
Previous Section Next Section

Workshop

The workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice.

Quiz

1.

Which MySQL function will enable you to run an expression many times over to find the speed of the iterations?

2.

Which SQL command will clean up the structure of your tables?

3.

Which FLUSH command resets the MySQL log files?

4.

To quickly determine if MySQL has support for InnoDB tables, would you use SHOW STATUS or SHOW VARIABLES?

5.

Write a SQL statement that will enable you to see the SQL statement used to create a table called myTable.

Answers

1.

The benchmark() function

2.

OPTIMIZE

3.

FLUSH LOGS

4.

SHOW VARIABLES

5.

SHOW CREATE TABLE myTable

Activities

  1. If you have root-level access to your server, change the values of key_buffer_size and table_cache, and run benchmark() functions after each change to see how the execution times differ.

  2. Use OPTIMIZE on all the tables you have created in your database to clean up any structural issues.

  3. Use the SHOW STATUS command to retrieve information about your MySQL server, and then issue FLUSH commands to clean up the server. After each command, use SHOW STATUS again to see which commands affect which results in the SHOW STATUS results display.

    Team LiB
    Previous Section Next Section


    JavaScript Editor Javascript source editor     Web programming