Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Sunday, 12 February 2012

Configuring ASP.NET for Persistant Seesion State Management

Hi,
We have created an ASPState database following the instructions in 311209 in
KB. One part of this is to run a job, ASPState_Job_DeleteExpiredSessions,
every minute to clean up any expired sessions from this database.
Recently we had MOM say that this job was causing blocking problems on the
ASPState db. What are the ramifications of changing the job frequency from 1
minute to longer on using this method?
Thanks
Chris WoodChris Wood wrote:
> Hi,
> We have created an ASPState database following the instructions in 311209 in
> KB. One part of this is to run a job, ASPState_Job_DeleteExpiredSessions,
> every minute to clean up any expired sessions from this database.
> Recently we had MOM say that this job was causing blocking problems on the
> ASPState db. What are the ramifications of changing the job frequency from 1
> minute to longer on using this method?
> Thanks
> Chris Wood
>
Review the execution plan for the delete query that you're running,
create the necessary indexes to eliminate any table or index scans that
the delete statement is doing. This will minimize the locking that is
done to the table.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Tracy,
This is a script provided by MS! You think that I should change it?
Thanks
Chris
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:ecdTMGMtGHA.1948@.TK2MSFTNGP04.phx.gbl...
> Chris Wood wrote:
>> Hi,
>> We have created an ASPState database following the instructions in 311209
>> in KB. One part of this is to run a job,
>> ASPState_Job_DeleteExpiredSessions, every minute to clean up any expired
>> sessions from this database.
>> Recently we had MOM say that this job was causing blocking problems on
>> the ASPState db. What are the ramifications of changing the job frequency
>> from 1 minute to longer on using this method?
>> Thanks
>> Chris Wood
> Review the execution plan for the delete query that you're running, create
> the necessary indexes to eliminate any table or index scans that the
> delete statement is doing. This will minimize the locking that is done to
> the table.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||Chris Wood wrote:
> Tracy,
> This is a script provided by MS! You think that I should change it?
> Thanks
>
Just because it's from Microsoft doesn't mean it's perfect. I'm not
familiar with the script you're using, but I didn't say you should
change the script itself. I suggested that you review the execution
plan, to make sure the proper indexes are in place. You are
experiencing blocking problems during a delete operation. This usually
means that the delete is doing a table or index scan and holding a
higher level lock than necessary. Putting the proper index in place
will eliminate the scan, minimizing the duration of the lock.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Configuring ASP.NET for Persistant Seesion State Management

Hi,
We have created an ASPState database following the instructions in 311209 in
KB. One part of this is to run a job, ASPState_Job_DeleteExpiredSessions,
every minute to clean up any expired sessions from this database.
Recently we had MOM say that this job was causing blocking problems on the
ASPState db. What are the ramifications of changing the job frequency from 1
minute to longer on using this method?
Thanks
Chris WoodChris Wood wrote:
> Hi,
> We have created an ASPState database following the instructions in 311209
in
> KB. One part of this is to run a job, ASPState_Job_DeleteExpiredSessions,
> every minute to clean up any expired sessions from this database.
> Recently we had MOM say that this job was causing blocking problems on the
> ASPState db. What are the ramifications of changing the job frequency from
1
> minute to longer on using this method?
> Thanks
> Chris Wood
>
Review the execution plan for the delete query that you're running,
create the necessary indexes to eliminate any table or index scans that
the delete statement is doing. This will minimize the locking that is
done to the table.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Tracy,
This is a script provided by MS! You think that I should change it?
Thanks
Chris
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:ecdTMGMtGHA.1948@.TK2MSFTNGP04.phx.gbl...
> Chris Wood wrote:
> Review the execution plan for the delete query that you're running, create
> the necessary indexes to eliminate any table or index scans that the
> delete statement is doing. This will minimize the locking that is done to
> the table.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||Chris Wood wrote:
> Tracy,
> This is a script provided by MS! You think that I should change it?
> Thanks
>
Just because it's from Microsoft doesn't mean it's perfect. I'm not
familiar with the script you're using, but I didn't say you should
change the script itself. I suggested that you review the execution
plan, to make sure the proper indexes are in place. You are
experiencing blocking problems during a delete operation. This usually
means that the delete is doing a table or index scan and holding a
higher level lock than necessary. Putting the proper index in place
will eliminate the scan, minimizing the duration of the lock.
Tracy McKibben
MCDBA
http://www.realsqlguy.com