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 enables you to run an expression many times over to find the speed of the iterations?

2.

Which SQL command cleans up the structure of your tables?

3.

Which FLUSH command resets the MySQL log files?

4.

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

5.

Write a SQL statement that enables 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 (3rd Edition)
ISBN: 0672328739
EAN: 2147483647
Year: 2004
Pages: 327

Similar book on Amazon

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