D
dman_2007
Guest
You can learn a lot of about how mysql is going to execute a select query by using Explain select statement. You can use the information thus obtained to see what you can do to help mysql run this query faster. An Explain select statement returns information in the following fields :
1) id : Gives the actual numeric position of the sselect within the complete query statement
2) select_type : Displays the type of select query.
3) table : name of the table from which the rows are being retrived
4) type : the type of join which will be performed
5) possible_keys : Indexes available which can be used to select rows from the table
6) key : Display index which will be actually used find rows.
7) key_len : length of the key select for use by mysql
8) ref : Displays the constant or column against which the selected key will be compared with to retrieve rows
9) rows : Total numbers of rows which will be examined by mysql to successfully execute this query
10) extra : This column contains extra information regarding the query execution plan
In my next post, i'll discuss some important fields among these.
6)
1) id : Gives the actual numeric position of the sselect within the complete query statement
2) select_type : Displays the type of select query.
3) table : name of the table from which the rows are being retrived
4) type : the type of join which will be performed
5) possible_keys : Indexes available which can be used to select rows from the table
6) key : Display index which will be actually used find rows.
7) key_len : length of the key select for use by mysql
8) ref : Displays the constant or column against which the selected key will be compared with to retrieve rows
9) rows : Total numbers of rows which will be examined by mysql to successfully execute this query
10) extra : This column contains extra information regarding the query execution plan
In my next post, i'll discuss some important fields among these.
6)