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 - Get File Statistics Using fn_virtualfilestats

SQL SERVER – Get File Statistics Using fn_virtualfilestats

January 8, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Statistics, SQL View

Which MDF or NDF file is the busiest? This query uses fn_virtualfilestats to show reads, writes, IO stalls and size for every database file.

Read More
SQL Server Query Optimizer Statistics.

SQL SERVER – DMV – sys.dm_exec_query_optimizer_info – Statistics of Optimizer

January 7, 2011
Pinal Dave
SQL Performance
SQL DMV, SQL Scripts

The DMV sys.dm_exec_query_optimizer_info keeps statistics of optimizer activity. My simple query shows optimizations, elapsed time, final cost and more.

Read More
Four figures seen from behind carrying one long oak beam on their shoulders along a village lane.

Striped Backups: Writing One Backup to Several Files

January 6, 2011
Pinal Dave
SQL Tips and Tricks
DBA, SQL Backup and Restore, SQL Server

Use striped backups across several files, inspect media families, restore every stripe, and test resource settings on your own server.

Read More
Generate Scripts Wizard.

SQL SERVER – Copy Statistics from One Server to Another Server

January 5, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Statistics

Without the client’s data, every query ran in zero milliseconds. Here is how I copy statistics from one server to another to tune with only the schema.

Read More
Gouache painting of a row of worn garden tools with one spotless untouched red trowel in the middle

Unused Index Script: Find Indexes That Only Cost You Writes

January 4, 2011
Pinal Dave
SQL Performance
SQL DMV, SQL Index, SQL Scripts

This Unused Index Script lists nonclustered indexes that SQL Server keeps writing to and no query ever reads. It starts from the index list so untouched indexes are not missed, skips the risky ones, and writes the disable and recreate statements. A garden center orders table shows one update dropping from 5,011 pages to 6 once an unused index is disabled.

Read More
Gouache painting of a workshop pegboard of tool outlines with one empty outline and a red hammer on the floor

Missing Index Script: Read the Suggestions Before You Create

January 3, 2011
Pinal Dave
SQL Performance
SQL DMV, SQL Index, SQL Scripts

This Missing Index Script ranks the indexes SQL Server wishes it had by a plain score and builds a CREATE INDEX statement for each. Read the key order, the INCLUDE list and the overlap before you create one. A garden center orders table shows the logical reads drop from 3,138 pages to 3.

Read More
SQL SERVER - Reduce the Virtual Log Files (VLFs) from LDF file

SQL SERVER – Reduce the Virtual Log Files (VLFs) from LDF file

January 2, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, VLF

Too many virtual log files are bad for your LDF. Here is a simple script to reduce the virtual log files right away with a log backup and a shrink.

Read More
Previous 1 … 612 613 614 615 616 617 618 … 841 Next
  • Books
  • Testimonials
  • Privacy Policy

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