SQL SERVER – System Function @@IDLE to Find System Ideal Time

Just the other day I got an email with user asking how do the @@idle function work with SQL Server as when he runs them it gives him some number but the number is not easy to interpret. I totally agree with the observation. When I was new to SQL Server, the best learning resource available was SQL Server Books On Line. I used to read Books On Line and learn quite a bit from it.

Read More

SQL SERVER – Puzzle – Playing with Datetime with Customer Data

I am preparing for a professional tour of Europe wherein I am planning to meet a number of customers as part of consulting and performance tuning assignments that I have agreed in early October. I am already swamped with the requests and I think the learning experience is second to none when one gets to work on global projects. Let us an interesting puzzle.

Read More

SQL SERVER – Find Week of the Year Using DatePart Function

As I blog every single day, lots of people ask me if I have to build a calender for the same. The answer is yes, I do not have a personal calender and I keep a note of all the ideas in the calender. The next day when I get ready to blog, I use the same calender as a reference to blog about the same. Most of the time I plan out my week at a time. Let us learn about how to find week of the year using datepart function.

Read More

SQL SERVER 2016 – STRING_SPLIT Function Performance Comparison – Notes from the Field #118

SQL Server 2016 is around the corner. We already have SQL Server 2016 RC0 released and many of us have started to test out various aspects of the same. For many years users have created temporary tables as well as used cross apply functions to split a large string and make it a table. I think every single time when I was assigned this task, I disliked it as the methods I used never made me happy. Well, the situation is now changed now with STRING_SPLIT function in SQL Server 2016.

In this episode of the Notes from the Field series database expert Kathi Kellenberger explains about easy and amazing functions of SQL Server. Kathi is an amazing instructor, she was the SQL author I have read in my early career. Today she brings a very new topic for database experts. Read the experience of Kathi in her own words.

Read More

Interview Question of the Week #046 – How @@DATEFIRST and SET DATEFIRST Are Related?

Question: How @@DATEFIRST and SET DATEFIRST are related? Answer: The master database’s syslanguages table has a DateFirst column that defines the first day of the week for a particular language. SQL Server with US English as default language, SQL Server sets DATEFIRST to 7 (Sunday) by default. We can reset any day…
Read More