Tag: Performance
-
DBA Scripts: Get Unused Indexes
Part of the DBA-Tools Project. Every non-clustered index has to be maintained by SQL Server on every INSERT, UPDATE, and DELETE against the table. A table with 12 non-clustered indexes means 12 index updates for every row changed. Some of those indexes earn their keep by serving real queries. Others haven’t been read by a…
Written by
-
DBA Scripts: Get Deadlock Summary
Part of the DBA-Tools Project. A deadlock is SQL Server’s way of resolving a situation it can’t otherwise escape: two transactions each holding a lock the other one needs, waiting on each other forever unless something intervenes. SQL Server intervenes automatically, picks one transaction as the victim, kills it, and lets the other proceed. The…
Written by
-
DBA Scripts: Get Blocking Chains
Part of the DBA-Tools Project. A single blocked session is usually easy to spot. The harder case is a chain: session C is waiting on session B, which is itself waiting on session A, which is sitting idle holding a lock from a transaction nobody remembers is still open. Killing C’s session does nothing, C…
Written by
-
DBA Scripts: Get Query Store Regressions and Forced Plans
Part of the DBA-Tools Project. “What Changed Today” and “Is the Plan I Forced Still Any Good” Query Store Top Queries tells you what’s expensive right now. This post covers two narrower, sharper questions that come up once Query Store is actually in use day to day: which queries got worse today compared to their…
Written by
-
DBA Scripts: Get Index Usage Stats
Part of the DBA-Tools Project. The Raw Usage Data Behind Every Index Decision Unused Indexes already filters straight to drop candidates in one database. This script is the raw data underneath that filter, and more: every index across every user database, its seeks, scans, lookups, and updates, classified into a usage pattern, with no filtering…
Written by
-
DBA Scripts: Get Query Performance Deep-Dive
Part of the DBA-Tools Project. Four Angles on “Why Is This Slow” That Go Beyond Top CPU Top CPU Queries ranks by raw resource consumption. These four scripts answer more specific questions the ranking alone can’t: Get-StoredProcedurePerformance ranks stored procedures specifically, not ad-hoc queries. Get-QueryVariance finds queries whose execution time swings wildly between runs, the…
Written by
-
DBA Scripts: Get Active Sessions and Requests
Part of the DBA-Tools Project. Who’s Connected, and What’s Actually Running Right Now Worker Threads and Active Sessions gives you the aggregate health number: how close the worker thread pool is to exhaustion. These three scripts give you the per-session detail underneath that number. Get-ActiveSessions lists every user session, connected or idle, with its current…
Written by
-
DBA Scripts: Get Top CPU Queries
Part of the DBA-Tools Project. Three Different Ways a Query Can Be the Problem “Which query is causing this” has more than one right answer, because a query can be expensive in different ways: it can burn CPU, it can generate huge I/O, or it can just habitually run slowly every time regardless of resource…
Written by
-
DBA Scripts: Query and Performance Tuning
Part of the DBA-Tools Project. “The database is slow” almost never means the whole database, it means one query, one plan, one statistic that went stale at the wrong moment. Eight scripts on this site cover the full path from “something feels slow” to a specific, fixable cause: which queries are actually consuming the resources,…
Written by
Blog Categories
- Backups & Recovery (7)
- DBA Scripts (97)
- High Availability (HA) (7)
- Installation & Configuration (14)
- Maintenance (4)
- Monitoring (14)
- Performance Tuning (11)
- Security (Encryption & Permissions) (6)
- T-SQL Fundamentals (11)
- Troubleshooting (10)
- Wait Types (201)
Latest Posts
- DBA Scripts: Generate Maintenance Jobs
- DBA Scripts: Get Job Schedules and Duration Trends
- How to Shrink SQL Server Database Files in Chunks
- DBA Scripts: Get Lock Escalation, Contention Analysis, and Blocking Chains with Plan
- DBA Scripts: Get Trace Flags and Resource Governor Configuration
- DBA Scripts: Get CPU Topology and OS Configuration Checks
Blog Tags
Access (3) Always On Availability Groups (4) Auditing (7) Backups (4) Blocking Locking (6) Database Backups & Recovery (8) Database Backups and Recovery (5) Database Maintenance (7) DBA Tools (28) Disk Space (5) Error Log (2) Extended Events (7) Features (6) High Availability (6) Indexes (5) Instance (3) Inventory (6) Jobs (3) Migration (6) Monitoring (24) Performance (19) Performance Troubleshooting (9) PowerShell (4) Queries (3) Query Behaviour (5) Security (7) SQL Agent (3) SQL Scripts (21) SQL Server Administration (10) SQL Server Configuration (7) SQL Server Errors (5) SQL Server High Availability (4) SQL Server Internals (3) SQL Server Management Studio (SSMS) (6) SQL Server Monitoring (7) SQL Server Networking (9) SQL Server Security (9) SQL Server Versions (2) Storage and Capacity (9) T-SQL (9) Temp DB (3) Tracing (7) Transaction Logs (5) Troubleshooting (14) Windows Server (4)