Category Archives: Databases

Everything related to databases. We love data and yes we love our databases too. Anything we do that relates to databases can be found here.

Scaling SQL Express with Stretch table feature

  Recently I was asked by a client if the Stretch table feature will work with SQL Express and if so what the limitations are. This seemed like an interesting use case so we explored further and here is what we found. Can SQL EXPRESS edition in SQL 2016 be used with stretch tables feature… Read More »

Decimal datatype rounding

Recently I was asked this question about how decimal is rounding off values when doing a simple calculation. The question was I am not able to find why output is getting round off in case of DECIMAL(38,0) but not in case of DECIMAL(37,0). As per BOL, decimal 37 and and 38 both should be having… Read More »

Identity value skips after restart

Recently a client of mine had complained to me about an issue they were facing when restarts happen on a system. After a restart the system skips the identity value by a 10 – 1000 depending on the data type of the identity column. This was a known issue in SQL 2012 and was touted… Read More »

Forcing Columnstore batch mode on Select * type query

Recently at a consulting project while working with tabular model I was asked about how we can force SQL Server to use batch mode on Columnstore index when doing a query which is essentially just a select *. To demonstrate this I have written two queries below which will return the same number of rows… Read More »

Weird ways I explain seemingly complicated SQL topics

Over the years I have accumulated some seemingly weird ways to explain topics within SQL Server. Usually in a training I find that participants are able to relate to an example in real life compared to some code written on the screen. While often the example might not be a perfect fit it still conveys… Read More »

Rebuild all indexes and statistics on Azure SQL database

Since Azure SQL databases are limited in what they expose to the management studio client we miss out on a lot of features within SSMS that we could normally use. One of the most common features we use frequently in this regard is the Rebuild Indexes and update statistics features within Maintenance Wizard. Below is… Read More »

String split using full text indexes

Recently I needed a way to extract keywords from email messages in order to create a list of noise words for a spam filter as well as implement an auto complete kind of option for the search box. The first option that came to mind was to use Term extraction in a SSIS package. The… Read More »

Charting controls: – Things to keep in mind

I often do a number of trainings on MSBI and PowerBI and one of the tasks we do during the course is “I would ask all participants to use the raw data and represent any information in the way they see it being used by the CEO of the company”. The participants have complete freedom… Read More »