From: Samuel on
Hi

I send to the database the same query for many records but only for some it
reposes very slowly

There is no apparent explanation as there is no large amount of data.

It is so slow that I had to raise the timeout from 30 to 120

Can anyone please suggest any reason. Is it file corruption (I backed up and
restored the database)

Thank you in advance,
Samuel


From: sloan on

Might be a theme today.

Check (1 post) before yours.


OR
Google "parameter sniffing"

Or maybe try this:
http://glennberrysqlperformance.spaces.live.com/blog/cns!45041418ECCAA960!715.entry




"Samuel" <smshulman(a)hotmail.com> wrote in message
news:%235D1yaltKHA.4568(a)TK2MSFTNGP05.phx.gbl...
> Hi
>
> I send to the database the same query for many records but only for some
> it reposes very slowly
>
> There is no apparent explanation as there is no large amount of data.
>
> It is so slow that I had to raise the timeout from 30 to 120
>
> Can anyone please suggest any reason. Is it file corruption (I backed up
> and restored the database)
>
> Thank you in advance,
> Samuel
>


From: Samuel on
I located the problem though I cannot explain it.

When I specify ORDRE BY TableA.FieldA it slows down dramatically. I do not
use a stored procedure

Thank you




"Samuel" <smshulman(a)hotmail.com> wrote in message
news:%235D1yaltKHA.4568(a)TK2MSFTNGP05.phx.gbl...
> Hi
>
> I send to the database the same query for many records but only for some
> it reposes very slowly
>
> There is no apparent explanation as there is no large amount of data.
>
> It is so slow that I had to raise the timeout from 30 to 120
>
> Can anyone please suggest any reason. Is it file corruption (I backed up
> and restored the database)
>
> Thank you in advance,
> Samuel
>


From: sloan on
//ORDRE BY TableA.FieldA //

You need to look at the Excecution Plan.

If you are doing a Table Scan on TableA.ColumnA (<<note my
rewording)........then it will be slow.

http://www.lmgtfy.com/?q=Query+is+Slow+%22Order+By%22+%22Sql+Server%22

(Not trying to be a butt, I just think that website is funny)




"Samuel" <smshulman(a)hotmail.com> wrote in message
news:%23pwo3QmtKHA.3536(a)TK2MSFTNGP06.phx.gbl...
>I located the problem though I cannot explain it.
>
> When I specify ORDRE BY TableA.FieldA it slows down dramatically. I do not
> use a stored procedure
>
> Thank you
>
>
>
>
> "Samuel" <smshulman(a)hotmail.com> wrote in message
> news:%235D1yaltKHA.4568(a)TK2MSFTNGP05.phx.gbl...
>> Hi
>>
>> I send to the database the same query for many records but only for some
>> it reposes very slowly
>>
>> There is no apparent explanation as there is no large amount of data.
>>
>> It is so slow that I had to raise the timeout from 30 to 120
>>
>> Can anyone please suggest any reason. Is it file corruption (I backed up
>> and restored the database)
>>
>> Thank you in advance,
>> Samuel
>>
>
>


From: TheSQLGuru on
Ordering hits tempdb for a sort operation. this can be very slow

--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"Samuel" <smshulman(a)hotmail.com> wrote in message
news:%23pwo3QmtKHA.3536(a)TK2MSFTNGP06.phx.gbl...
>I located the problem though I cannot explain it.
>
> When I specify ORDRE BY TableA.FieldA it slows down dramatically. I do not
> use a stored procedure
>
> Thank you
>
>
>
>
> "Samuel" <smshulman(a)hotmail.com> wrote in message
> news:%235D1yaltKHA.4568(a)TK2MSFTNGP05.phx.gbl...
>> Hi
>>
>> I send to the database the same query for many records but only for some
>> it reposes very slowly
>>
>> There is no apparent explanation as there is no large amount of data.
>>
>> It is so slow that I had to raise the timeout from 30 to 120
>>
>> Can anyone please suggest any reason. Is it file corruption (I backed up
>> and restored the database)
>>
>> Thank you in advance,
>> Samuel
>>
>
>