Thanks, that's just what I needed. I'll have to get around to changing that field to a number soon...
Until yesterday it was never obvious that the (lack of) quotes was causing the slowdown. It really only happened when I entered a query into the worksheet and that's when I would omit the quotes... > > My guess is that there is an index on the orderno field > > but it is a 'varchar' index (as it should be) > > > > because the string you are comparing to is an int, it's > > probably converting each orderno to int and comparing that way. > > (I would think the opposite though) > > > > so because there is no, 'int' index for that column, then > > it table scans. > > Indeed. And the problem is easily identified because the explain output > will show the table scan. Always explain slow queries. > > http://www.evolt.org/article/Use_Oracle_s_Explain_Plan_to_Tune_Your_Queries/17/2986/ > > Jochem > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

