----- Original Message -----
From: alexander sicular
To: CF-Talk
Sent: Sunday, October 26, 2003 3:10 PM
Subject: Re:cfquery performance suggestions
maybe you could use category=left(category, 'p', 1) instead of like. depending on your database syntax may vary. i find that like is the slowest operation you can do.
gl,
alex
>I'm using the following query to find all the catagories in a table
>that start with a certain letter :-
>
>SELECT distinct CATEGORY
>FROM dbo.mainfile
>where CATEGORY like 'P%'
>order by CATEGORY ASC
>
>I have an index based on Category but it runs slow (it's a v. large
>table - and it't can't be redesigned). Any suggestions for a better
>query to get the results ? - btw I'm very much a SQL novice
>
>Cheers
>
>Richard
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

