New answers tagged

1 vote

Can you create SQL database transactions, and run things outside of those transactions while the transaction is opened?

The query does not modify anything, so there is no benefit in keeping it outside the transaction. You might just as well have it be a part of the transaction, because it does not take any unpleasant ...
user avatar
  • 33.4k
1 vote
Accepted

The approach to take when creating/editing many interrelated records in a transactional way?

Agreed with Charlieface in the comments for the following reasons: "especially if you have these "events" coming in multiple times a second" - You can have those events happen 100 ...
user avatar
  • 24.7k
2 votes
Accepted

MySQL InnoDB migrations custom implementation: How to deal with DML statements which trigger a commit in the background?

I think you mean DDL. DML statements are like SELECT/INSERT/UPDATE/DELETE, and I can't think of one of the DML statements that cause an implicit commit. If you're concerned about a crash partway ...
user avatar
  • 9,871
2 votes

How do databases guarantee that two transactions with different isolation levels run concurrently correctly

Many algorithms have been developed for this. They fall into two basic categories - optimistic and pessimistic. I'm going to use slightly different wording to your question. A session is a transport-...
user avatar
0 votes

Rollback a transaction using single thread/multi thread

In Sql server there is not multi thread concepts like thread management by other high level language (like c#), and mechanisms for rollback is out of your control and it implemented and managed by ...
user avatar
0 votes

Rollback a transaction using single thread/multi thread

SQL Server 2019 introduced Accelerated database recovery (ADR). https://docs.microsoft.com/en-us/sql/relational-databases/accelerated-database-recovery-concepts?view=sql-server-ver16 If you have ADR ...
user avatar
  • 1,523
3 votes
Accepted

Rollback a transaction using single thread/multi thread

Rollback are mostly single threaded (this is why rollback could take way longer then the transaction you are rollbacking). https://www.brentozar.com/archive/2014/03/happens-issue-kill/ You cannot &...
user avatar

Top 50 recent answers are included