Hi,
I have a production db and a restored copy of the db on two different servers.
A query on production has degraded to the point of timeout(30 seconds).
Running the same query on the restored copy produces an execution time of a couple of seconds.
The Execution plans look slightly different.
Moving a couple of joins around from:
LEFT JOIN AD ON T.Ref = AD.Reference
INNER JOIN SM ON T.Reference = SM.Reference
to:
INNER JOIN SM ON T.Reference = SM.Reference
LEFT JOIN AD ON T.Ref = AD.Reference
Results in the production execution time mirroring the restored copy execution time and the execution plans being the same.
Any ideas as to what is happening here and how I can 'correct' the production system.
Thanks
I have a production db and a restored copy of the db on two different servers.
A query on production has degraded to the point of timeout(30 seconds).
Running the same query on the restored copy produces an execution time of a couple of seconds.
The Execution plans look slightly different.
Moving a couple of joins around from:
LEFT JOIN AD ON T.Ref = AD.Reference
INNER JOIN SM ON T.Reference = SM.Reference
to:
INNER JOIN SM ON T.Reference = SM.Reference
LEFT JOIN AD ON T.Ref = AD.Reference
Results in the production execution time mirroring the restored copy execution time and the execution plans being the same.
Any ideas as to what is happening here and how I can 'correct' the production system.
Thanks