December 10, 2014 at 8:41 am
I have a situation where a script runs in just over 1 Minute in test but in Live it takes nearly 30mins.
I have identified it to be down to a section of code that is executed 1/2M times in the execution plan. 1 execution for each row returned. This action doesn't happen in test there is only 1 execution.
Test stats indexing are completely inaccurate, Live is up to date.
OK test is Virtual Live is Physical. But what could cause it to do 500M executions in Live.
December 10, 2014 at 8:47 am
Sorry 500K execution in Live.
Why would it choose such an awful plan in LIVE
December 10, 2014 at 9:29 am
Could you post both execution plans to have a better idea on what you're talking about?
December 10, 2014 at 10:24 am
Without seeing the plans, I'm speculating. But, if the data sets are radically different between the two servers, that might explain it. If the cost threshold for parallelism is different. If the ANSI settings are different. And, if the statistics are out of date, they are the primary driver, you can pretty much expect to see differences.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 15, 2014 at 3:16 am
Data is pretty much the same,
Stats are up to date on LIVE,
Out of date on Test (this was what confused me).
Seems like the Environments are too different that is what is causing the issue.
Virtual vs Physical
Core difference 4 vs 8
Mem difference.
Config = MAxdop, cost threshold etc.
Thanks for your responses.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply