Posts

Showing posts from February, 2021

Speed up your Inserts and Updates ...after learning how the Write Ahead Logging mechanism works

Image
Hi Friends,  Thanks for the many views on this blog, i am really happy! Today i will show you a way to speed up your inserts and updates .  This require an explanation (and i hope to do it clearly) of how writing data to disk works. We will talk about Durability , Write ahead logging mechanism and the Log Buffer . As always the one and only way to make SQL Server run faster is to ... know in detail how it works! Enjoy the reading! Intro: ACID properties and the durability Let's take a step back hanging up to a post written some time ago. I would invite you infact to read a post i wrote in 2019, the title is SQL Server: Transazioni, Lock e Deadlock. Un po di teoria spiegata in modo semplice!   We talked about transactions, locks and ACID properties ( Atomicity, Consistency, Isolation, e Durability) of a DBMS. Today we need to remember what durability means. So, what durability means? Durability means that once a transaction has been confirmed changes made must never be lo

SQL Server, inside the parser: the Get_Gen_Lex procedure

Image
Hello friends, Well, we have arrived on Mars! The Perseverance probe designed by NASA reached the Red Planet after 203 days! "The human being by his nature always wants to overcome his limits and go beyond. If curiosity is the great engine that makes humanity progress, science is the engine. Today is a big day for science!" To this and to those who do not want to have limits I dedicate this post .   Yes, again about the Parser of SQL Server   Today we talk about another procedure of the SqlLang.dll the Get_Gen_Lex procedure. This is the second part of a series of posts about the parser and you can find the first part here Enjoy the reading! The CParser::Get_GenLex procedure This procedure, part of the CParser class, is usually called after the GetChar procedure and it is used to classify the character just read. In many parts of the LGetToken routine for example we have: Procedure and parameters Looking at the source below   we can say that the declaration is: int CParse