Not necessarily.

Using a scalar function on the column name renders indexes useless.  On 
the other hand, doing a like clause where the value is something 
like "a%" and not "%a%" will use the index (if there is one) on that 
column.

----- Original Message -----
From: Bud <[EMAIL PROTECTED]>
Date: Friday, March 29, 2002 9:59 am
Subject: Re: SOT: Like vs. =

> On 3/29/02, Tony Schreiber penned:
> >While I know that like is always slower, consider this:
> >
> >WHERE left(description,1) = 'A'
> >
> >OR
> >
> >WHERE description LIKE 'A%'
> >
> >Which would be faster?
> 
> The first one would be faster. But only because it wouldn't return 
> any records. ;)
> -- 
> 
> Bud Schneehagen - Tropical Web Creations
> 
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> ColdFusion Solutions / eCommerce Development
> [EMAIL PROTECTED]
> http://www.twcreations.com/
> 954.721.3452
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to