tags:

views:

35

answers:

1

I trying to use command Explain to obtain the query time of my mySql database, however it return always 0.00sec, am i misunderstand the Explain command usage in mySql?

Below is my command:

mysql> explain select * from table;

0.00 sec

mysql> select * from table;

15 sec

why the explain wouldn't return the same query time result as i using the same command?

Pls help

+1  A: 

Because Explain is completely different.
It never runs a query. But just tells how it would be run.

Col. Shrapnel
so how do i optimize my database this command? since i nvr get the query time
sean
@sean by reading this command's output.
Col. Shrapnel