September 23, 2011 at 5:22 am
Hi Experts,
One of the query fetching some 30k records and doing an update is taking some seconds in the morning and the same query taking hours to complete in the afternoon. No blocking observed,no other jobs running on that server. The user connections have increase but the concurrent connection value is 0.
Please help
TIA
September 23, 2011 at 5:27 am
First guess => http://sqlinthewild.co.za/index.php/2011/03/22/statistics-row-estimations-and-the-ascending-date-column
If that doesn't help, post the actual execution plan. Ideally the one when it's good and the bad one too.
September 23, 2011 at 6:40 am
Thanks for the Reply ninja.
Its teh same query executing morning and afternoon
September 23, 2011 at 6:44 am
Ratheesh.K.Nair (9/23/2011)
Thanks for the Reply ninja.Its teh same query executing morning and afternoon
Please post both. The slow & fast version.
There's important info in those.
September 23, 2011 at 6:45 am
Are you aware of "huge" data modifications? If they exists, update statistics should be run π
Regards,
Paulo Condeça.
September 23, 2011 at 6:49 am
Netic (9/23/2011)
Are you aware of "huge" data modifications? If they exists, update statistics should be run πRegards,
Paulo Condeça.
The plan would answer that question ;-).
September 23, 2011 at 7:01 am
But if thats the case tehn it should not run fast next day morning right??
It is like everyday morning the query executes in seconds and in afternoon its taking hours..Actually its an SSIS package we executed the scripts under the same in query windows and the result was same.
September 23, 2011 at 7:08 am
The size of the "touched" tables aren't the same during morning and night right ? π
September 23, 2011 at 7:26 am
Ratheesh.K.Nair (9/23/2011)
But if thats the case tehn it should not run fast next day morning right??It is like everyday morning the query executes in seconds and in afternoon its taking hours..Actually its an SSIS package we executed the scripts under the same in query windows and the result was same.
Did you read the article I linked to? This sounds like a classic case of that.
September 23, 2011 at 7:27 am
Netic (9/23/2011)
The size of the "touched" tables aren't the same during morning and night right ? π
Maybe not but right now I'm assuming constant growth with varying speed, but without dumping of the data. Maybe I'm wrong here.
September 23, 2011 at 8:25 am
Netic (9/23/2011)
The size of the "touched" tables aren't the same during morning and night right ? π
its the same table,same number or rows,same data..
September 23, 2011 at 8:33 am
Ninja's_RGR'us (9/23/2011)
Netic (9/23/2011)
The size of the "touched" tables aren't the same during morning and night right ? πMaybe not but right now I'm assuming constant growth with varying speed, but without dumping of the data. Maybe I'm wrong here.
π
September 23, 2011 at 8:37 am
Ninja's_RGR'us (9/23/2011)
Ratheesh.K.Nair (9/23/2011)
But if thats the case tehn it should not run fast next day morning right??It is like everyday morning the query executes in seconds and in afternoon its taking hours..Actually its an SSIS package we executed the scripts under the same in query windows and the result was same.
Did you read the article I linked to? This sounds like a classic case of that.
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply