This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL Server query execution plan.

SQL SERVER – Introduction to sys.dm_exec_query_optimizer_info

March 28, 2008
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, SQL System Table

While browsing Books Online I found sys.dm_exec_query_optimizer_info, which returns statistics about the query optimizer to help you tune a workload.

Read More
SQL SERVER - 2005 - Find Index Fragmentation Details - Slow Index Performance

SQL SERVER – 2005 – Find Index Fragmentation Details – Slow Index Performance

March 27, 2008
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts, SQL System Table

A slow index turned out to be heavily fragmented. My quick script uses sys.dm_db_index_physical_stats to show index fragmentation details for every index.

Read More
SQL SERVER - 2005 - Find Highest / Most Used Stored Procedure

SQL SERVER – 2005 – Find Highest / Most Used Stored Procedure

March 22, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure, SQL System Table

Which stored procedure runs most often? My small SQL Server 2005 script finds the most used stored procedure, with execution count, worker time and calls per second.

Read More
SQL SERVER - 2005 - Retrieve Any User Defined Object Details Using sys objects Database

SQL SERVER – 2005 – Retrieve Any User Defined Object Details Using sys objects Database

March 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL System Table, SQL Utility

The sys.objects catalog view has a row for every schema-scoped object, so you can retrieve any user defined object details, like foreign keys, by object type.

Read More
SQL SERVER - 2005 - Retrieve Processes Using Specified Database

SQL SERVER – 2005 – Retrieve Processes Using Specified Database

March 15, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table

Jim Sz shared a quick script to retrieve processes that use a specific database from sys.sysprocesses, with spid, status, host name and login.

Read More
Database files listing.

SQL SERVER – Get a Row Per File of a Database as Stored in the Master Database

January 21, 2008
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server, SQL System Table

Each database has at least two files. This quick script on sys.master_files returns a row per file of a database, just as it is stored in master.

Read More
SQL SERVER - Reclaim Space After Dropping Variable - Length Columns Using DBCC CLEANTABLE

SQL SERVER – Reclaim Space After Dropping Variable – Length Columns Using DBCC CLEANTABLE

January 11, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server DBCC, SQL System Table

Dropping a variable length column does not shrink the table. DBCC CLEANTABLE reclaims that space without an index rebuild. Example on AdventureWorks.

Read More
Previous 1 … 10 11 12 13 14 15 16 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com