April 24, 2002 at 8:58 am
Hi All,
I am trying to run a simple query something like this:
SELECT DISTINCT la1, la2 FROM view_one WHERE la1='my string' ORDER BY la2
Now my question is when I run this query in the connected mode(what I meen is in Sql server 7.0 enterprise edition on windows NT) the query takes 4 seconds to reply.
However when I run the same query on my local server on pc in windowsNT the query is taking forever to run. Can someone tell me why this is happening. Is this because the query is based on views?
Thanks you!
April 24, 2002 at 9:13 am
I found out the error. When I use the like in the where clause the query runs much faster.
Thanks!
April 24, 2002 at 12:13 pm
To figure out why you have to compare the query plans generated on both servers, plus look at the differences if any in the indexes used, even when the indexes were last rebuilt/how fragmented they are. Tons of reasons for queries to perform differently.
Andy
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply