Avatar of readyset
readyset

asked on 

Deadlock resolution

Here is our scenario - we have a ui screen where schedules are created for students  - these schedules are stored in - studentsschedules table. Very intensive update/insert/delete oriented table all the time.

We also provide a background service which syncs schedules to student calendars , this service pings our databaseserver every 15 minutes for any new schedules depending on the calendar client. The code for this is a simple update to the table - studentschedules and then select from studentschedules with joins to other tables.

We are facing some deadlock errors on our production server,  to resolve this , on the background service , I am planning to move the update and read into two different transactions, one with the update and one with the read. I am going to put isolation level for the read transaction as a "read uncommitted". I am going to test my results then and re-tweak depending on my results.

I am really not concerned about the dirty reads , because the service keeps pinging our servers at some point the data will be correctly updated. In our case the deletes might flow through a  little late which is fine with us.

Any thoughts or opinions on this approach?
Microsoft SQL ServerMicrosoft SQL Server 2008Microsoft SQL Server 2005

Avatar of undefined
Last Comment
Ess Kay
ASKER CERTIFIED SOLUTION
Avatar of Ess Kay
Ess Kay
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Ess Kay
Ess Kay
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo