Tutorial of MS SQL Extended Events in 7 T-SQL Steps

Hi, today I would like to show you how you can use Extended Events Sessions on SQL Server 2008 or above. Extended Event Sessions are future of monitoring of the SQL Server. From many years solutions that used SQL Profiler Traces or DMV were not always accurate and fast. DMV queries could be very fast. However it is impossible to get statistics only per one sessions from DMV. And that is why I want to show you Continue ReadingTutorial of MS SQL Extended Events in 7 T-SQL Steps

Simple Service Bus Training

Hi, today I prepared my first screencast trining on YouTube about the Simple Service Bus I made. It took me a lot of effort and it is just a start. If you like such content please share that information in comments. I would love to make more such videos in future. Here you can find ( downloads). Enjoy! p ;).

SQL Ninja uses ORDER BY with CASE

Hi, today I want to show you simple technique which can be used when you need parameterised ORDER BY cause in T-SQL. Sometimes you may want to have elegant query. Example is from my today’s code review that I gave to colleague. On the Internet is very difficult to find such solution. So, I decided to show it to you here. There are many possible scenarios for this example usage. For example you may want to have Continue ReadingSQL Ninja uses ORDER BY with CASE

SQL Queries Tuning by Brent Ozard

Hi, today I want to share with you training that I get from one colleague today. This is available at Watch Brent Tune Queries [Video] I have to said that I really enjoy this presentation and charisma of the presenter. And I learn a lot from his presentation. So I decided to share it with you. There is one thing I cannot agree from my experience which is changing requirements to tune up queries. I never ask Continue ReadingSQL Queries Tuning by Brent Ozard

SQL Ninja gets Products from Group Tree CTE

Hi, today I want to show you comparison of 2 possible techniques fro get data about all Products mapped to the Product Groups tree. I wrote as usual one T-SQL script that you can run each time you want to modify something to recalculate your results and check how they perform in your SQL Server. There are 2 nice things you can get from provided example. First is 2 ways of calculation that you can choose from. Continue ReadingSQL Ninja gets Products from Group Tree CTE

SQL Ninja replace for Cursor with CTE

Hi, today I want to share with you results on nice experiment and its code. I like C#, but currently most of my work attention is focused on T-SQL code. And making optimizations of performance of T-SQL code. I have both SQL Ninja and DB Council titles at work not by the accident, you know. And I want to show you how to replace cursors with CTE in good way. Cursors in general are bad and working Continue ReadingSQL Ninja replace for Cursor with CTE

TSQLTester for SQL Ninja with Mocking

Hi, I am using very often TSQLTester from the moment it was created. And it saved me a lot of time with my performance challenges. Of course my favorite advantage of TSQLTester is testing content of data. Today I would like to extend first implementation and give you option for mocking of procedures of functions that in standard production cases connecting to the Service Bus or writing to some Queue implementations in the middle of our code Continue ReadingTSQLTester for SQL Ninja with Mocking

TSQLTester for SQL Ninja

Hi, today I would like to share with you idea of testing tool for T-SQL developers who want to not only replace stored procedures with fasters stored procedures but also want to be sure that old code on SQL Server produces exactly the same results as a new optimized and tuned up one. I created this tool as command line to easy integrate with possible automate of testing and TSQLTester.exe has 4 parameters. All of those parameters Continue ReadingTSQLTester for SQL Ninja