In a previous post I talked about transaction log works, and what about using a memory-optimized table? SQL Server has the feature Memory-Optimized Objects to improve performance. In-memory nonclustered indexes are implemented using a data structure called a Bw-Tree. A Bw-Tree is a lock and latch-free variation of a B-Tree. In-memory architecture: To enable an … Continue reading Memory-optimized Logging
Checkpoints flush dirty data pages from the buffer cache of the current database to disk. This minimizes the active portion of the log that must be processed during a full recovery of a database. During a full recovery, the following types of actions are performed: The log records of modifications not flushed to disk before … Continue reading What the Checkpoint does?
To see how many VLFs you have solely look at the number of rows returned by DBCC LOGINFO. The size and number of VLFs you'll have depends largely on the size that the chunk is when it's added to you transaction log. There is no general rule how to determine the best values for the … Continue reading VLF (Virtual Log Files)
Doing crash and recovery tests on my local machine I got the SQL Server instance not going online. After trying the third time to bring my instance online thinking was something else problem I saw the SQL Server errolog file and I could see the problem. Not enough memory, but wasn't on my machine, was … Continue reading There is insufficient system memory in resource pool
What is Query Store? Query Store is a tool to troubleshoot query performance by capturing a range of information about query usage, CPU, memory consumption, I/O and execution time, and retaining every Execution Plan for analysis. So, if query store stores my query information, what kind of scenarios I could use this information? To fix … Continue reading Query Store Usage Scenarios
One more undocumented function/commands. The fn_dump_dblog function is used to read transaction logs from a log backup file. This is an example fo the undocumented function to read transaction logs: SELECT [Current LSN], [Operation], [Transaction Name], [Transaction ID], SUSER_SNAME ([Transaction SID]) AS DBUser FROM fn_dump_dblog ( NULL, NULL, N'DISK', 1, N'C:\temp\Backup_Logfile.trn', DEFAULT, DEFAULT, … Continue reading SQL Server Undocumented 2
Every database has a transaction log that records all transactions and the database modifications made by each transaction The transaction log is a critical component of the database. If there is a system failure, you will need that log to bring your database back to a consistent state. How that works? What steps SQL Server … Continue reading Logging