| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Shawn Green (MySQL) | Date: | July 22 2010 4:20pm |
| Subject: | Re: combined or single indexes? | ||
| View as plain text | |||
On 7/21/2010 1:02 PM, Tompkins Neil wrote: > Hi > > So Just running a basic query I get returned the following : > > table,type,possible_keys,key,key_len,ref,rows,Extra, > Products,ALL,,,,,9884,where used, > > Therefore, I assume "*ALL*" is the worst possible type and should look at > adding a an index to this particular field ? > Why assume when the manual is right there to remove all doubt? http://dev.mysql.com/doc/refman/5.1/en/explain-output.html #### ALL A full table scan is done for each combination of rows from the previous tables. This is normally not good if the table is the first table not marked const, and usually very bad in all other cases. Normally, you can avoid ALL by adding indexes that enable row retrieval from the table based on constant values or column values from earlier tables. #### -- Shawn Green MySQL Principle Technical Support Engineer Oracle USA, Inc. Office: Blountville, TN
| Thread | ||
|---|---|---|
| • combined or single indexes? | Bryan Cantwell | 6 Jul |
| • Re: combined or single indexes? | Joerg Bruehe | 6 Jul |
| • Re: combined or single indexes? | Octavian Rasnita | 7 Jul |
| • Re: combined or single indexes? | Neil Tompkins | 8 Jul |
| • Re: combined or single indexes? | Johan De Meersman | 9 Jul |
| • Re: combined or single indexes? | Neil Tompkins | 9 Jul |
| • Re: combined or single indexes? | Johan De Meersman | 9 Jul |
| • Re: combined or single indexes? | mos | 9 Jul |
| • Re: combined or single indexes? | Tompkins Neil | 21 Jul |
| • Re: combined or single indexes? | MySQL) | 22 Jul |
| • Re: combined or single indexes? | Tompkins Neil | 22 Jul |
| • RE: combined or single indexes? | Jerry Schwartz | 22 Jul |
| • Re: combined or single indexes? | Tompkins Neil | 22 Jul |
| • RE: combined or single indexes? | Jerry Schwartz | 22 Jul |
| • Re: combined or single indexes? | Neil Tompkins | 23 Jul |
