I agree with Jochem's suggestion of using cfswitch for numeric or perhaps
single character searches.

CF offers short circuit evaluation that increases the speed of boolean
decisions.

Whenever you need more than one cfif or cfelseif, you need to really
evaluate which condition is the most likely chosen.  This will prevent how
many decisions are made per statement.

If the weight of all decisions is equally probably, you could argue the
useage of cfswitch.

Jochem also has a very good answer to this solution.  "Why are you just
taking my word for it?"  Exactly.  Test it yourself.  He found the solution
for a finite and given solution set.  Is it the exact culprit for your
latency issues?  That would be too general to assume.

Use his information as possible check or implement this as a practice to
make sure your dynamic queries cannot be handled a different way.

I have sincere issues myself putting CF logic into my queries.  I let the DB
handle this type of logic in the form of stored procedures, which will
calculate my execution plan for me in advance.

Cheers,
Teddy




On 1/30/07, Matt Robertson <[EMAIL PROTECTED]> wrote:
>
> On 1/30/07, Richard Kroll <[EMAIL PROTECTED]> wrote:
> > We noticed that when the cfswitch was
> > outside of a loop, the performance difference was virtually
> > undetectable.
>
> Good point.  The performance difference on a single operation could
> well be acceptable, if still suboptimal.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268087
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to