Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learn T-SQL Querying - Second Edition

You're reading from  Learn T-SQL Querying - Second Edition

Product type Book
Published in Feb 2024
Publisher Packt
ISBN-13 9781837638994
Pages 456 pages
Edition 2nd Edition
Languages
Authors (2):
Pedro Lopes Pedro Lopes
Profile icon Pedro Lopes
Pam Lahoud Pam Lahoud
Profile icon Pam Lahoud
View More author details

Table of Contents (18) Chapters

Preface 1. Part 1: Query Processing Fundamentals
2. Chapter 1: Understanding Query Processing 3. Chapter 2: Mechanics of the Query Optimizer 4. Part 2: Dos and Don’ts of T-SQL
5. Chapter 3: Exploring Query Execution Plans 6. Chapter 4: Indexing for T-SQL Performance 7. Chapter 5: Writing Elegant T-SQL Queries 8. Chapter 6: Discovering T-SQL Anti- Patterns in Depth 9. Part 3: Assembling Our Query Troubleshooting Toolbox
10. Chapter 7: Building Diagnostic Queries Using DMVs and DMFs 11. Chapter 8: Building XEvent Profiler Traces 12. Chapter 9: Comparative Analysis of Query Plans 13. Chapter 10: Tracking Performance History with Query Store 14. Chapter 11: Troubleshooting Live Queries 15. Chapter 12: Managing Optimizer Changes 16. Index 17. Other Books You May Enjoy

Tracking expensive queries

Query Store only collects plans for Data Manipulation Language (DML) statements such as SELECT, INSERT, UPDATE, DELETE, MERGE, and BULK INSERT, as these are the T-SQL statements that will be responsible for most of our SQL Database Engine’s resource usage. Most database administrators (DBAs) and database reliability engineers are constantly looking for ways to optimize resource usage; after all, if T-SQL queries are using just the resources they need (CPU, I/O, and memory), then the SQL Database Engine is operating at peak efficiency and allows for maximum concurrency with its current hardware resources.

This brings us to one of the main benefits of Query Store: tracking our workload heavy hitters – the most resource-consuming queries. With this exercise, we may be able to uncover tuning opportunities that, if successful, further improve the efficiency of the server’s resource usage.

To generate enough workload in our AdventureWorks...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}