in reply to
How do I handle a DB error when a SQL statement must not fail?
I’m sure that there will very-shortly be some recommends from other people about what sort of service you might use ... but ... given what you have just said about the activity for this table in your most-recent post, great big bells are going off in my head right now to the effect that I can see no plausible reason why you should be encountering deadlocks in this situation, other than that there is an as-yet undiscovered bug in your program. I would take a very close look at your SQL server's logs and/or administrative console. There is something wrong with this picture.
If you are doing simple inserts of reasonable volumes of data, each one enclosed in a transaction with a reasonable isolation-level, and there is no other competing activity except at 1 AM, then I simply cannot fathom why you would ever be encountering deadlocks. I was skeptical about this earlier, thinking it could be something else in a very-unusual situation, but now I’m sayin’ that line from Men In Black: “Zed, we got a bug!” Therefore, my advice to you now shifts back to considering what the bug might be – and I hope that other Monks will now chime-in on that, as I expect they will.
And, okay, you’ve really piqued my curiosity now. What is it that your competitor takes twenty(!!) seconds (seconds, not microseconds) to do with a database?