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
Displaying AdventureWorks database files.

SQL SERVER – Shrinking NDF and MDF Files – A Safe Operation

January 25, 2009
Pinal Dave
SQL Performance
SQL Data Storage, SQL Scripts, SQL Server DBCC, SQL Server Security

Is shrinking NDF and MDF files safe? A reader asked if it causes data loss. It does not, but I explain why shrinking them is often not a good idea.

Read More
SQL SERVER - 2008 - 2005 - Find Longest Running Query - TSQL - Part 2

SQL SERVER – 2008 – 2005 – Find Longest Running Query – TSQL – Part 2

January 23, 2009
Pinal Dave
SQL Performance
Best Practices, SQL Scripts, SQL Server DBCC, SQL System Table

An updated script to find the longest running query in SQL Server 2005 and 2008, with the divide by zero error fixed and time now shown in milliseconds.

Read More
SQL SERVER - Rules for Optimizining Any Query - Best Practices for Query Optimization

SQL SERVER – Rules for Optimizining Any Query – Best Practices for Query Optimization

January 20, 2009
Pinal Dave
SQL Performance
Best Practices, SQL Scripts

My quick rules for query optimization: a primary key, a clustered index, the right non-clustered indexes, fewer views and triggers, and other simple checks.

Read More
SQL SERVER - Difference Between Index Scan and Index Seek

SQL SERVER – Difference Between Index Scan and Index Seek

January 18, 2009
Pinal Dave
SQL Performance
SQL Index, SQL Scripts

What is the difference between Index Scan and Index Seek? I explain how SQL Server uses search predicates to decide which index operation a query gets.

Read More
ALTER FUNCTION UDF.

SQL SERVER – Remove Duplicate Entry from Comma Delimited String – UDF

January 15, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

A simple UDF from reader Ashish Jain that removes duplicate entries from a comma delimited string by turning it into a table and using DISTINCT.

Read More
SQL Server performance query results.

SQL SERVER – Find Number of Rows and Disk Space Reserved – Using sp_spaceused Interesting Observation

January 14, 2009
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Function, SQL Scripts, SQL Server DBCC, SQL Stored Procedure, SQL Utility

sp_spaceused shows the row count of a table and the disk space reserved. Here is why its numbers looked wrong on AdventureWorks and how @updateusage fixed them.

Read More
Set ROWCOUNT Option in SQL Server Management Studio.

SQL SERVER – Find Row Count in Table – Find Largest Table in Database – T-SQL

January 13, 2009
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts, SQL System Table, SQL Utility

A quick script using sys.dm_db_partition_stats that lists the row count of every table and shows the largest table in database right at the top.

Read More
Previous 1 … 291 292 293 294 295 296 297 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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