Does Dropping Primary Key Drop Clustered Index on the Same Column? – Interview Question of the Week #082

Question: When we drop primary key on the column, does it automatically drop a clustered index on the same column (if created)?

Answer: This is one of the most popular questions, whenever I ask this to any candidate, they usually give an answer in yes or no. However, if I ask them follow up question to confirm, I have noticed most of the time they change the reply or accept that they really do not know the answer. It is totally fine. As when I was beginning with SQL, I even did not know the answer of it. I learn doing various experiments and doing various interviews.

Read More

SQL SERVER – Extended Events to watch for using ColumnStore Index

In the recent past, I have written a number of posts around ColumnStore Index and how they function. Some of the nuances of working with ColumnStore Indexes are available in this blog for reference. I have also written a few posts around Extended Events. One of my DBA friends pinged me to check if there were any way to use Profiler to see how ColumnStore Indexes worked. Obviously, there was nothing much of help I could offer because there were actually none in reality.

Read More

SQL SERVER – Updating Data into ColumnStore Index with SQL Server 2012

Off late I have been writing tons of content working with SQL Server 2016. Some of the cool capabilities was to introduce the ability to update a ColumnStore index. This was also covered in the SQL SERVER 2016: Updating Non-Clustered ColumnStore Index Enhancement earlier. One of the readers asked me an interesting question about being inside SQL Server 2012 and they wanted to write / update their data on the ColumnStore enabled system and what was the process for them. The email started saying they were getting the following error.

Read More

SQL SERVER – ShowPlan XML Additions for ColumnStore Indexes

The last time when I wrote about ColumnsStore FAQ, one of the readers had an interesting question. The question was around how to identify the traits of using a column store inside an execution plan. The very thought got me thinking. I was thinking where to start. I remembered that ShowPlan XML was a great way to see some of these attributes. The very next question that came up, what should one look forward to inside a ShowPlan XML.

Read More