What are the differences between EXPLAIN and DESC commands in MySQL ?
+1
A:
- Explain will give you more information about a query,
- describe will give you more information about tables or columns.
You can also use EXPLAIN on a table name, in which case it will behave exactly like DESCRIBE.
EXPLAIN SELECT *
FROM `customer`
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE customer ALL NULL NULL NULL NULL 2
vs.
DESCRIBE `customer`
Field Type Null Key Default Extra
CustomerID varchar(2) NO
Cx varchar(3) NO
Konerak
2010-06-23 09:02:21