Jump to ratings and reviews
Rate this book

Learn T-SQL Querying: A guide to developing efficient and elegant T-SQL code

Rate this book
Empower T-SQL developers with the skills to troubleshoot query performance issues, identify anti-patterns in their code and write efficient T-SQL queries

Key FeaturesAn all-in-one guide to master the techniques of writing efficient T-SQL codeLearn query optimization fundamentals, query analysis, and how query structure impacts performanceInsightful solutions to detect, analyze, and tune query performance issuesBook DescriptionTransact-SQL (T-SQL) is Microsoft’s proprietary extension to the SQL language used with Microsoft SQL Server and Azure SQL Database. This 2nd edition is for all data professionals who want to master the art of writing efficient T-SQL code in modern SQL Server versions, as well as Azure SQL Database.

The book starts with query processing fundamentals to help you write solid, performant T-SQL queries. You will be introduced to the mechanics of the Query Optimizer. Later you will explore Query Execution Plans. It will help you analyze execution plans to gain insights into current performance and gauge whether a query is scalable. You will learn to build diagnostic queries using dynamic management views (DMVs) and dynamic management functions (DMFs) to unlock the secrets of T-SQL execution. Next, you will learn about indexing for T-SQL Performance. You will also learn about SQL Server built-in tools to shorten the time to address query performance and scalability issues. You will learn to implement various features such as Avoiding UDF pitfalls, Understanding Predicate SARGability, Query Store, and Query Tuning Assistant using hands-on examples.

By the end of the book, you will be able to determine where query performance bottlenecks are, understand what anti-patterns may be in use, and how to avoid such pitfalls as we advance.

What you will learnIdentify opportunities to write well-formed T-SQL statementsGet familiar with the Cardinality EstimatorCreate efficient indexes for your existing workloadsBest practices for T-SQL queryingExplore Query Execution DMVsUtilize the latest performance optimization features in SQL Server 2017, 2019, and 2022Protect query performance during upgrades to newer versions of SQL ServerWho this book is forThis book is for database administrators, database developers, data analysts, data scientists and T-SQL practitioners who want to master the art of writing efficient T-SQL code and troubleshooting query performance issues using practical examples. A basic understanding of T-SQL syntax, writing queries in SQL Server, and using the SQL Server Management Studio tool is helpful to get started.

Table of ContentsUnderstanding Query ProcessingMechanics of the Query OptimizerExploring Query Execution PlansIndexing for T-SQL PerformanceWriting Elegant T-SQL QueriesDiscovering T-SQL Anti-patterns in Depth Building diagnostic queries using DMVs and DMFsBuilding XEvent profiler tracesComparative analysis of Query PlansTracking performance history with Query StoreTroubleshooting Live QueriesManaging optimizer changes with the Query Tuning Assistant

456 pages, Paperback

Published February 29, 2024

2 people want to read

About the author

Pedro Lopes

34 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
0 (0%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
No one has reviewed this book yet.

Can't find what you're looking for?

Get help and learn more about the design.