thanks for all the great info guys. The table only gets rebuilt once a week (I "think") and is running of sql 2000. The table contains about 2.5 mil rows
  ----- 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]

Reply via email to