i ran the explain command on my main table in mysql.it showed like
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE xyz ALL NULL NULL NULL NULL 1722 Using where
does this affect the performance of the site? like when i so a select clause ? i have a primary key but this command says primary key 开发者_开发问答as no .
Key - The key column indicates the key (index) that MySQL actually decided to use. The key is NULL if no index was chosen. To force MySQL to use or ignore an index listed in the possible_keys column, use FORCE INDEX, USE INDEX, or IGNORE INDEX in your query
From your query result we can see that you have no Index defined for your table because possible_keys column is also NULL.
A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and increased storage space.
Take a look at this page to see the syntax used to create an index in MySQL:
CREATE INDEX Syntax
This page details each column of the explain plan:
Looking at the MySQL Explain Plan
精彩评论