This article was initially posted on SQLServerCentral @ 2024-04-26. Short answer: The column is marked as ‘deleted’ and will stop being visible/usable. But, most importantly - The record/table size will remain unchanged. A metadata operation Dropping a column is a metadata/logical operation, not a physical one. This means that the data isn’t removed/overwritten by this action. As Paul Randal mentions here : “the cost of that will be deferred for the inserters and not for the deleters”.

Continue reading

A couple of days ago I was doing some cleaning on some Azure SQL DBs and shrinking some files to lower the bill. To check my progress I needed to check the size before/after the task in an easy way for multiple Azure SQL DBs. Check Azure SQL DB storage space for 1 database If you need to check the storage space being used by 1 Azure SQL DB, that is as easy as jumping on the portal, select the desired database and you can find the information in the Overview.

Continue reading

Today I will write just a short blog post to do a quick reminder! I still hear a lot of people suggesting CTEs because they think it works like a temporary table (you populate the table and then it can be/is reutilized). It doesn’t! From de documentation : Specifies a temporary named result set, known as a common table expression (CTE). Maybe they are focusing on the “temporary” word. Using the CTE two times will perform two different executions!

Continue reading

Author's picture

Cláudio Silva

Data Platform Architect and PowerShell lover.

Data Platform Architect