May 23, 2011 at 9:12 am
Hello,
I need to improve performance on these query, when I run this query without where clause it takes seconds, when I run where clause, it take couple minutes.How can I iprove performance? I am Thank you
SELECT Emp_ID fROM qry_Employee where emp_id = 25000
May 23, 2011 at 9:18 am
Check the plan for the query with the where condition. I bet you have an index seek with bookmark lookup which is actually more expansive than a full scan.
I'd try updating the stats or rebuilding the index... if that doesn't do it then look into parameter sniffing.
May 23, 2011 at 9:46 am
Here I included a copy of my plan.Can you please assist me with that.Thank you
May 23, 2011 at 11:15 am
Please attach the actaul plan... there's way more data we need to see besides the operators and %.
P.S. I see you are using SSMS, is the server sql 2000 or maybe the compatibility level at 80??
May 23, 2011 at 11:20 am
I can't save execution plan, it is grey out
May 23, 2011 at 12:05 pm
never seeen that b4...
May 23, 2011 at 12:38 pm
Ninja's_RGR'us (5/23/2011)
never seeen that b4...
SQL 2000 server.
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
May 23, 2011 at 1:36 pm
GilaMonster (5/23/2011)
Ninja's_RGR'us (5/23/2011)
never seeen that b4...SQL 2000 server.
Ya but I was under the impression that ssms was generating that file, so I assumed it could word on sql 2k... but obviously I was wrong ;-).
May 23, 2011 at 1:57 pm
Ninja's_RGR'us (5/23/2011)
Ya but I was under the impression that ssms was generating that file, so I assumed it could word on sql 2k... but obviously I was wrong ;-).
No, it's the SQL engine that generates the file. All that SSMS does if you select 'include actual execution plan' is to run SET STATISTICS XML ON before it runs the query and then convert the xml that SQL returns into a graphical reprentation.
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 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply