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.



Sams Teach Yourself PHP MySQL and Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (4th Edition)
ISBN: 067232976X
EAN: 2147483647
Year: 2003
Pages: 333
Authors: Julie Meloni

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net