June 29, 2006 at 2:09 pm
Running the below SQL statements is slow
declare @P1 int
set @P1=0
declare @P2 int
set @P2=16388
declare @P3 int
set @P3=8193
declare @P4 int
set @P4=0
exec sp_cursoropen @P1 output, N'SELECT TOP 1 "State:" FROM "EXTERNAL_SUPPORT"."Incident" WHERE "Incident #" = 1884', @P2 output, @P3 output, @P4 output
select @P1, @P2, @P3, @P4
when I use Select TOP 1 * instead of Select TOP 1 "State:" is also slow.
When I use Select * by removing TOP 1, the query returns in a sec.
Can anyone shed some light on this?
July 2, 2006 at 2:40 pm
July 2, 2006 at 9:00 pm
Try not using a cursor ...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply