| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Steve Meyers | Date: | January 18 2011 1:55am |
| Subject: | Re: Rewrite SQL to stop table scan | ||
| View as plain text | |||
On 1/17/11 9:52 AM, Jerry Schwartz wrote: > [JS] I don't understand how an index on a timestamp would help. Theoretically, > each record could have a unique value for the timestamp; so the index would > have an entry for each record. Would MySQL really use that in preference to, > or in combination with, an index on devid? You are correct. The ideal index would be across (devid, stamp).
| Thread | ||
|---|---|---|
| • Rewrite SQL to stop table scan | Bruce Ferrell | 14 Jan |
| • Re: Rewrite SQL to stop table scan | Johan De Meersman | 14 Jan |
| • Re: Rewrite SQL to stop table scan | Yogesh Kore | 14 Jan |
| • Re: Rewrite SQL to stop table scan | Yogesh Kore | 14 Jan |
| • Re: Rewrite SQL to stop table scan | Peter Brawley | 14 Jan |
| • Re: Rewrite SQL to stop table scan | Steve Meyers | 14 Jan |
| • Re: Rewrite SQL to stop table scan | Bruce Ferrell | 15 Jan |
| • RE: Rewrite SQL to stop table scan | Jerry Schwartz | 17 Jan |
| • Re: Rewrite SQL to stop table scan | Steve Meyers | 18 Jan |
| • RE: Rewrite SQL to stop table scan | Jerry Schwartz | 14 Jan |
