Posts

Showing posts from August, 2021

SQL Server, statistics, performance and the Ascending key problem

Image
Hi guys, September is coming and it is time for our editorial staff to reopen its doors. I hope you have recharged your batteries to 100%. Today we will talk about statistics and performance . Yes, we have talked about it many times before but today we will focus on an issue that could lead to a poor performance situation .  Maybe your query is poor performing due to this issue? Ready? Go! Statististics and the Ascending Key Problem Statistics need to be updated because they help SQL server create a good execution plan. I like to do an example by making a parallel between extracting data from the database and a trip: if i have to go to work and my office is near me it is better to take a bicycle. If my work is far from me it is better take the car or the train. Likewise, if I need to extract a few records, the optimizer can implement a JOIN by choosing a nested loop. Otherwise it would be better to use other operators such as merge or hash. This is why statistics are important. Becaus

SQL Server, columnstore indexes: A bit of theory and some examples (when to use columnstore indexes and when not)

Image
Hi guys,   Today we speak about columnstore index .  I wrote a summary, a list of things to know about and some examples in order to learn how to use (or not) this types of indexes. Are you Ready? Yes!    What is a columstore index Yes but what is a columnstore index?   Microsoft introduced, in SQL Server, Columnstore indexes that are the standard for storing and querying large tables, let's think to tables with million of records.   The difference is that data is stored inside page in a different way . In a row-based index data is stored in one or more data pages. In a column-based index data is stored in a separate pages for each column of the table. A columnstore is data that's logically organized as a table with rows and columns, and physically stored in a column-wise data format.   A rowstore is data that's logically organized as a table with rows and columns, and physically stored in a row-wise data format.  Just as there are clustered and non-clustered indexes, we c

SQL Server 2019 CU12 is out and other updates

Image
Hi Guys! Just some news on the SQL World in this August.   SQL Server 2019 CU12 While we all are waiting for the announce of the incoming SQL Server 2021, a new CU for SQL Server 2019 is launched. You can download the latest SQL Server 2019 CU12  here Improvements and fixes included in this cumulative update are here   Reading the changelog i can state that many improvements are done on Columnstore index AZURE Data Studio , is the new brother of our well known SSMS. We talked about Azure Data Studio here and in particular about it's notebook feature ( here ) Julie Koesmarno of MsSQLGirl have published a post to inform us that starting from the release v1.32.0-insider the loading time of very large notebook has improved from Minutes to seconds. Connectivity Side On the SQL Server Connectivity side drivers ODBC Driver 17.8 e JDBC Driver 9.4 are update. Have a great week friends and remember to share knowledge!!! Luca Biondi @ SQLServerPerformance blog 2021!        Pre