| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Dan Nelson | Date: | July 4 2007 9:09pm |
| Subject: | Re: How to Query by First Part of a VARCHAR? | ||
| View as plain text | |||
In the last episode (Jul 04), David T. Ashley said: > On 7/4/07, gary <byoteki@stripped> wrote: > > SELECT column FROM table WHERE column LIKE "CAT\_%"; > > Would it be reasonable to assume that if "column" is indexed, the > query would execute quickly, i.e. I would assume that the indexing > would facilitate this kind of query? Yes, but only for prefix checks like in this example. ` LIKE "%CAT%" ' or ` LIKE "%CAT" ' can't use an index. -- Dan Nelson dnelson@stripped
| Thread | ||
|---|---|---|
| • How to Query by First Part of a VARCHAR? | David T. Ashley | 4 Jul |
| • Re: How to Query by First Part of a VARCHAR? | gary | 4 Jul |
| • Re: How to Query by First Part of a VARCHAR? | David T. Ashley | 4 Jul |
| • Re: How to Query by First Part of a VARCHAR? | Dan Nelson | 4 Jul |
| • Re: How to Query by First Part of a VARCHAR? | David T. Ashley | 4 Jul |
| • Re: How to Query by First Part of a VARCHAR? | gary | 4 Jul |
