Archive for the ‘MySQL’ Category

My good friend Ian (isnoop.net), a great guy and amazing developer, pointed out this MySQL function: PROCEDURE ANALYSE. To quote the website (2nd paragraph):

ANALYSE() examines the result from a query and returns an analysis of the results that suggests optimal data types for each column that may help reduce table sizes. To obtain this analysis, append PROCEDURE ANALYSE to the end of a SELECT statement.

Simple, helpful analysis. It doesn’t ‘fix’ things but is a nice, additional tool to EXPLAIN. What’s most unique, though, is that this function is buried in the “Extending MySQL :: Adding New Procedures to MySQL” section.  I would never go to these pages in MySQL.com as I can’t think of anything I need MySQL to do that it doesn’t do already… I’m no DBA to be sure!

But I DO have a pretty bizarre SELECT I need to write today. I’m looking forward to seeing how EXPLAIN and PROCEDURE ANALYSE might help me in not burying our MySQL server!

.