Skip to content
Advertisement

Mysql analyze table content

I forgotten the name of the SQL command to analyse the content of a table. The command I’m looking for shows me for each colum the min/max/avg length of the content. If I remember correctly it starts with a normal select

SELECT * FROM table foo bar

All google searches shows me aggregate functions or “analyse table”. But that’s not what I’m looking for.

Advertisement

Answer

https://dev.mysql.com/doc/refman/5.7/en/procedure-analyse.html

SELECT * FROM mytable PROCEDURE ANALYSE()

Note this is deprecated in MySQL 5.7 and removed in MySQL 8.0.

Hopefully someday there will be some other implementation (perhaps a MySQL Shell plugin) for users of 8.0.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement