views:

722

answers:

2

I used a query a few weeks ago in MySQL that described a table and suggested possible improvements to its structure. For example, if I have an int field but only the numbers 1-3 in that field, it will suggest set(1,2,3) as the type.

I think I was using phpMyAdmin but I've been through all the functions I can find - Analyze, Describe, Explain, Optimize, etc - to no avail. I can't for the life of me remember what the query was!

+3  A: 

This is what phpMyAdmin gives me:

SELECT *
FROM `table_name`
PROCEDURE ANALYSE ( )
Phill Sacre
That's exactly the one - thanks! How did you get to this in phpMyAdmin?
DisgruntledGoat
In phpMyAdmin, look at the 'Structure' page of the table you want. Underneath the table there should be a link saying 'Propose Table Structure'.
Phill Sacre
A: 

In phpMyAdmin 2.11.6 Go to Structure tab of your table. Below list of fields there are 3 buttons with labels: "Print view" "Relation view" "Propose table structure" .

Last one is what you need.

rix