Monthly Archives: June 2018

Online Indexes Failures in Azure for VLDBs

Recently we had a requirement that was caused by a very unique situation. A table with a column of datatype nvarchar(max) was inadvertently populated with some text in excess of 20MB of data/row. This resulted in the table blowing up from around 3GB to over 250GB and later 350GB. Naturally the sudden surge in size… Read More »

Adding a Quintillion

An interesting problem was asked on #Sqlhelp recently about adding very large numbers, in excess of 20 digits in SSAS tabular model. While most of us will find that bigint or decimal datatype is large enough for anything we can imagine storing; it is still an interesting problem. Mostly because as the volume of data… Read More »

Query to find size of tables in Azure database

Quick and dirty way to find the size of all tables in a azure database. [codesyntax lang=”tsql”] drop table #list drop table #data go CREATE table #data ( name varchar(100), rows varchar(100), reserved varchar(100), datasize varchar(100), indexsize varchar(100), unused varchar(100)) select ‘ insert into #data exec sp_spaceused ”’+table_schema+’.’+table_name+”” as Query into #list from INFORMATION_SCHEMA.TABLEs alter… Read More »

Analyze Actual Execution Plan in SSMS

This might be a hidden gem in SSMS that most people aren’t aware of so I figured I would post about it. I recently used this feature to understand the impact of inaccurate cardinality estimate on the performance of a query. In order to view this option you need to run the query within SSMS… Read More »