Tag: Queries

  • DBA Scripts: Get Implicit Conversions

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting › Query & Performance Tuning An indexed lookup is scanning when it should seek, or CPU is climbing with no single query to blame, and the application sends its strings as nvarchar. This script lists every cached statement whose plan…

  • DBA Scripts: Get Statistics Health

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting › Query & Performance Tuning Query plans are only as good as the statistics SQL Server uses to build them. When a table’s data distribution changes but its statistics don’t get refreshed to match, the optimizer keeps making decisions based…

  • DBA Scripts: Get Top CPU Queries

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting › Query & Performance Tuning Which Query Is the Problem CPU is pinned and you need the statement behind it. Get-TopCpuQueries ranks the plan cache by total CPU. The two scripts beside it rank the same cache by logical reads…