Hmmm. That seems to conflict with what Steven says. Perhaps a blood match is in order?
On Wed, Sep 8, 2010 at 3:10 PM, Mike Chabot <[email protected]> wrote: > > In SQL Server go with "like str%." The reason is that like str% is > sargable and functions are not. Functions also have overhead that > native set-based SQL does not. I would assume the same is true with > mySQL. Native SQL is usually faster than functions as a general rule, > unless the equivalent SQL is wildly complex relative to what the > function is doing for you. > > -Mike Chabot > > On Wed, Sep 8, 2010 at 1:27 PM, Michael Grant <[email protected]> wrote: > > > > What about mySQL? > > > > Do you know if this is documented and easy to find? > > > > > > > > On Wed, Sep 8, 2010 at 1:23 PM, DURETTE, STEVEN J (ATTASIAIT) < > > [email protected]> wrote: > > > >> > >> With SQL Server, DEFINITELY go with left(str, 4) = 'string' > >> > >> It has much less processing overhead. > >> > >> -----Original Message----- > >> From: Michael Grant [mailto:[email protected]] > >> Sent: Wednesday, September 08, 2010 1:20 PM > >> To: cf-talk > >> Subject: WHERE Left(str,5) = 'string' VS WHERE str LIKE 'string%' > >> > >> > >> Any advantage to one over the other? > >> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336914 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

