As I promised in my previous post T-SQL script to find hierarchy of tables – Columnar result, here is another version of the query to get the hierarchy of tables in the form of rows. ; WITH cte_Hierarchy_Of_Tables AS ( SELECT A.[name] AS [Parent] , A.[object_id] AS [Parent_Object_ID] , A.[name] AS [Child] , A.[object_id] AS … Continue reading T-SQL script to find hierarchy of tables – Row-wise result
Author: Brahmanand Shukla
T-SQL script to find hierarchy of tables – Columnar result
One of my LinkedIn connection reached out to me for help, to find the hierarchy of all the tables in a database. He was in dire need of some help, since there are around 250 tables in his database, and he need to write delete script to delete data requested by his team. As we … Continue reading T-SQL script to find hierarchy of tables – Columnar result
Game changer settings # MAXDOP and Cost threshold for parallelism
I got a performance tuning assignment for an esteemed customer in the Financial Services domain. I went through the wait stats of SQL Server using the built-in SQL Server Report, called Performance Dashboard. I found CPU – Parallelism referred to as CXPACKET was leading the list, followed by Buffer IO, Lock, and Latch. Parallelism in SQL Server refers to two settings – MAXDOP and Cost threshold … Continue reading Game changer settings # MAXDOP and Cost threshold for parallelism
Storage savings with Table Compression
In one of my recent assignments, my client asked me for a solution, to reduce the disk space requirement, of the staging database of an ETL workload. It made me study and compare the Table Compression feature of SQL Server. This article will not explain Compression but will compare the storage and performance aspects of … Continue reading Storage savings with Table Compression
Estimating the storage savings by removing columns with NULL value across the table or marking them as SPARSE
In the previous article Find columns with NULL values across the table we discussed that storage space can be saved by removing columns with NULL value across the table or marking them as SPARSE. We also learnt about the query to find all such columns across the tables of a database. In this article we'll … Continue reading Estimating the storage savings by removing columns with NULL value across the table or marking them as SPARSE