4 ms·
For SQL Server, I would read through these articles: https://www.itprotoday.com/sql-server/sql-server-database-engine-basics https://www.itprotoday.com/sql-ser
by rawgabbit 2y ago
For SQL Server, I would read through these articles:
https://www.itprotoday.com/sql-server/sql-server-database-engine-basics https://www.itprotoday.com/sql-server/sql-server-database-en.... Explains role of query plan (can pull either from actual file or from an index(s)) and write-ahead-log (Microsoft gave it the unfortunate name of Transaction Log) for hardening.
https://learn.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store?view=sql-server-ver16 https://learn.microsoft.com/en-us/sql/relational-databases/p.... Explains how to use the Query Store to identify poor performing queries.
https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-deadlocks-guide?view=sql-server-ver16 https://learn.microsoft.com/en-us/sql/relational-databases/s.... Explains that SQL Server handles the problem of two concurrent users attempting to modify the same record at the same time via DEADLOCKS. You want to use Extended Events to troubleshoot deadlocks.
https://learn.microsoft.com/en-us/azure/architecture/patterns/category/data-management https://learn.microsoft.com/en-us/azure/architecture/pattern.... Explains how CQRS and Event Sourcing architectures can help minimize deadlocks.
https://www.business-case-analysis.com/accounting-cycle.html https://www.business-case-analysis.com/accounting-cycle.html. I would argue the best architecture to minimize deadlocks is to mimic what accounting systems do. Multiple Clients submit order requests to a batch system that posts/processes them sequentially. Until the central batch system posts, the transaction is pending. Similar to how Amazon accepts your order request instantaneously; but it may take several minutes for your order to be confirmed.
- rawgabbit 2y agoFor bonus minutiae, SQL Server has a problem with upserts. Here is the old school and the new way for handling it. https://sqlperformance.com/2020/09/locking/upsert-anti-pattern https://sqlperformance.com/2020/09/locking/upsert-anti-patte... https://learn.microsoft.com/en-us/sql/relational-databases/performance/optimized-locking https://learn.microsoft.com/en-us/sql/relational-databases/p...
- pragmatic 2y agoThe second is azure sql only.