Bug #82086 PROCEDURE ANALYSE() is antiquated
Submitted: 2 Jul 2016 5:12 Modified: 24 Dec 2019 14:22
Reporter: Rick James Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.6.13, 5.6.31, 5.7.13 OS:Any
Assigned to: CPU Architecture:Any
Tags: ANALYSE

[2 Jul 2016 5:12] Rick James
Description:
ANALYZE()
* Does not understand character sets -- don't recommend CHAR for non-utf8 text
* Recommends TINYTEXT, which is not as good as VARCHAR (think tmp tables)
* Recommends expanding TIMESTAMP from 4 (or 5) bytes to CHAR(19) which is much bigger, especially with utf8 or utf8mb4
* Recommends expanding TIMESTAMP to CHAR(19), thereby losing timezone info.
* Is too eager to generate long ENUMs -- although they may save space, they hurt usability and 'range' optimization.
* Does not know about microseconds.

See also http://dba.stackexchange.com/questions/141841/procedure-analyse-suggests-to-turn-timestamp...

How to repeat:
ANALYSE any table with strings and TIMESTAMPs.

Suggested fix:
Overhaul the code, or remove it.
[4 Jul 2016 12:30] Umesh Shastry
Hello Rick James,

Thank you for the report and feedback!

Thanks,
Umesh
[24 Dec 2019 14:22] Roy Lyseng
Posted by developer:
 
Closed since support for PROCEDURE ANALYSE ha been removed.