New Pluralsight course: SQL Server: Using SentryOne Plan Explorer

Jonathan’s latest Pluralsight course has been published: SQL Server: Using SentryOne Plan Explorer. It’s almost 3 hours long, and from the course description:

Query plan analysis is both a science and an art, and the best tool for the job is SentryOne Plan Explorer. In this course, SQL Server: Using SentryOne Plan Explorer, you will learn how to make the most of the tool to make query plan analysis and performance tuning much easier and more intuitive than using SQL Server Management Studio. First, you will gain an understanding of how Plan Explorer compares to Management Studio, demonstrating how Plan Explorer solves the problems and shortcomings that Management Studio has. Next, you will discover how to use the the Plan Explorer user interface, including how the various information displays can help with performance analysis and tuning, and the various methods for getting query plans into the tool. Finally, you will explore how to use the more advanced features of the tool like index and statistics analysis, and profiling query performance using live query statistics. When you are finished with this course, you will have the skills and knowledge to start using the powerful SentryOne Plan Explorer tool to greatly improve your query plan analysis and performance tuning capabilities.

It’s a complete update for his 2013 course, and covers the very latest release of SentryOne’s fantastic (and free!) tool.

The modules are:

  • Introduction
  • Comparing Plan Explorer to SSMS
  • Using the Plan Explorer UI
  • Getting Execution Plans to Plan Explorer
  • Using Index and Statistics Analysis
  • Profiling Query Performance

Check it out here.

We now have more than 180 hours of SQLskills online training available (see all our courses here), all for as little as $29/month through Pluralsight (including more than 6,000 other developer and IT training courses). That’s unbeatable value that you can’t afford to ignore.

Enjoy!

Updated sys.dm_os_waiting_tasks script to correctly parse nodeId

I realized that I’d fixed an issue with my sys.dm_os_waiting_tasks script to correctly parse out the parallelism nodeId from the resource_description column (as newer versions include more info after the nodeId=X info) but I never blogged the update. Here it is for your use(and all other references have been updated to point to this post).

Enjoy!

(Note that ‘text’ on one line does not have delimiters because that messes up the code formatting plugin):

/*============================================================================
  File:     WaitingTasks.sql

  Summary:  Snapshot of waiting tasks

  SQL Server Versions: 2005 onward
------------------------------------------------------------------------------
  Written by Paul S. Randal, SQLskills.com

  (c) 2019, SQLskills.com. All rights reserved.

  For more scripts and sample code, check out 
    http://www.SQLskills.com

  You may alter this code for your own *non-commercial* purposes. You may
  republish altered code as long as you include this copyright and give due
  credit, but you must obtain prior permission before blogging this code.
  
  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF 
  ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED 
  TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  PARTICULAR PURPOSE.
============================================================================*/
SELECT
    [owt].[session_id] AS [SPID],
    [owt].[exec_context_id] AS [Thread],
    [ot].[scheduler_id] AS [Scheduler],
    [owt].[wait_duration_ms] AS [wait_ms],
    [owt].[wait_type],
    [owt].[blocking_session_id] AS [Blocking SPID],
    [owt].[resource_description],
    CASE [owt].[wait_type]
        WHEN N'CXPACKET' THEN
            SUBSTRING ( -- earlier versions don't have anything after the nodeID...
                [owt].[resource_description],
                CHARINDEX (N'nodeId=', [owt].[resource_description]) + 7,
                CHARINDEX (N' tid=', [owt].[resource_description] + ' tid=') -
                    CHARINDEX (N'nodeId=', [owt].[resource_description]) - 7
            )
        ELSE NULL
    END AS [Node ID],
    [eqmg].[dop] AS [DOP],
    [er].[database_id] AS [DBID],
    CAST ('https://www.sqlskills.com/help/waits/' + [owt].[wait_type] as XML) AS [Help/Info URL],
    [eqp].[query_plan],
    [est].text
FROM sys.dm_os_waiting_tasks [owt]
INNER JOIN sys.dm_os_tasks [ot] ON
    [owt].[waiting_task_address] = [ot].[task_address]
INNER JOIN sys.dm_exec_sessions [es] ON
    [owt].[session_id] = [es].[session_id]
INNER JOIN sys.dm_exec_requests [er] ON
    [es].[session_id] = [er].[session_id]
FULL JOIN sys.dm_exec_query_memory_grants [eqmg] ON
    [owt].[session_id] = [eqmg].[session_id]
OUTER APPLY sys.dm_exec_sql_text ([er].[sql_handle]) [est]
OUTER APPLY sys.dm_exec_query_plan ([er].[plan_handle]) [eqp]
WHERE
    [es].[is_user_process] = 1
ORDER BY
    [owt].[session_id],
    [owt].[exec_context_id];
GO

New Pluralsight exam prep course: SQL Server: Understanding Database Fundamentals (98-364)

Tim’s latest Pluralsight course has been published: SQL Server: Understanding Database Fundamentals (98-364). It’s just over 2 hours long, and from the course description:

It is very common for databases to be part of a company’s I.T. infrastructure. In this course, SQL Server: Understanding Database Fundamentals (98-364), you will learn the information and skills necessary to pass the 98-364 exam. First, you will learn core database concepts around database structure and how data is stored, along with statements used to create objects and manipulate data. Next, you will discover database design concepts and relational integrity, plus the impact of primary, foreign, and composite keys. Finally, you will explore how to administer a database, including authentication methods, regular database maintenance, and how to back up and restore databases. When you are finished with this course, you will have the skills and knowledge to start creating and using databases, and to pass the 98-364 Understanding Database Fundamentals exam.

It’s very much a course for absolute beginners in databases, and is geared towards the 98-364 exam.

The modules are:

  • Introduction
  • Understanding Core Database Concepts
  • How to Create Database Objects
  • Manipulating Data
  • Understanding Data Storage
  • How to Administer a Database

Check it out here.

We now have more than 180 hours of SQLskills online training available (see all our courses here), all for as little as $29/month through Pluralsight (including more than 6,000 other developer and IT training courses). That’s unbeatable value that you can’t afford to ignore.

Enjoy!