37.3. Using SHOW WARNINGS for Optimization


37.3. Using SHOW WARNINGS for Optimization

The SHOW WARNINGS statement displays diagnostic messages produced by statements that encounter execution abnormalities. (See Section 21.2, "The SHOW WARNINGS Statement.") It's not an analysis tool in the same sense as EXPLAIN because it doesn't provide information about the optimizer. Rather, it can serve to identify statements that may simply be unnecessary. For example, DROP TABLE IF EXISTS produces a warning if the table does not exist. It's true that eliminating a single statement of this kind is likely to provide only a minimal gain in application performance. However, in the case that an application has a bug or is misdesigned, it might indeed be issuing large numbers of unnecessary statements, and use of SHOW WARNINGS can help you diagnose this.



MySQL 5 Certification Study Guide
MySQL 5.0 Certification Study Guide
ISBN: 0672328127
EAN: 2147483647
Year: 2006
Pages: 312

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