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?

A1:

The benchmark() function.

2:

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

A2:

OPTIMIZE

3:

Which FLUSH command resets the MySQL log files?

A3:

FLUSH LOGS

4:

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

A4:

SHOW VARIABLES

5:

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

A5:

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 in 24 Hours
Sams Teach Yourself PHP, MySQL and Apache in 24 Hours
ISBN: 067232489X
EAN: 2147483647
Year: 2005
Pages: 263

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