February 9, 2011 at 8:27 am
TheSQLGuru (2/9/2011)
a) parameter sniffing as cause:1) run your query on both servers with HARD-CODED input values instead of parameters.
2) run query on both servers using OPTION (RECOMPILE)
b) SET options as cause:
1) use exact same SSMS window to execute exact same query against each server
c) estimated rows different as cause:
review actual query plan and compare estimated and actual rowcounts on each part of the query plan between the servers
Thanks.
i) I am running with Hard-coded values.
ii) using ssms to run exact same query.
February 9, 2011 at 9:32 am
sqldba_icon (2/9/2011)
TheSQLGuru (2/9/2011)
a) parameter sniffing as cause:1) run your query on both servers with HARD-CODED input values instead of parameters.
2) run query on both servers using OPTION (RECOMPILE)
b) SET options as cause:
1) use exact same SSMS window to execute exact same query against each server
c) estimated rows different as cause:
review actual query plan and compare estimated and actual rowcounts on each part of the query plan between the servers
Thanks.
i) I am running with Hard-coded values.
ii) using ssms to run exact same query.
Actual/estimated rowcount differences?
We REALLY do need to be able to see full table schemas (including indexes and statistics), queries and some table rowcount information to be able to help further.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 2 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply