June 30, 2009 at 10:25 am
Hi Sir ,
Some one , Please help me !!
I am trying to optimize one store procedure
The problem is when
I use EXEC store procedure , i am seeing table scan in execution plan
but when i declare the varibles and pass the parameters directly in
the query .. i didn't see any table scan all i see is index Seek ...
what should be the Issuse , please help me regarding this .. because of the tabelscan this store procedures runs very slow .....
Thanks in advance
June 30, 2009 at 10:35 am
I suspect parameter sniffing of one form or another. http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/
If you want specific help, please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 30, 2009 at 11:17 am
Hi Gila ,
Thanks ! That was great article ,but this will not slove my problem
because this article http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/
explains about only if we pass different parameters ...
But , i am passing the same parameters in both the scenarios ..
Thanks
June 30, 2009 at 11:32 am
That's the first of a series of three. Did you read the others?
Again, if you want specific help, please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply