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 - Plan Recompilation and Reduce Recompilation - Performance Tuning

SQL SERVER – Plan Recompilation and Reduce Recompilation – Performance Tuning

February 18, 2010
Pinal Dave
SQL Performance
SQL Index, SQL Scripts, SQL Stored Procedure, SQL System Table

Plan recompilation hurts performance just like a first compile. Learn what causes it, from schema changes to SET options, and how to reduce recompilation.

Read More
SQL SERVER - ALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE

SQL SERVER – ALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE

February 11, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts

Cannot drop a database because it is in use? SET SINGLE_USER WITH ROLLBACK IMMEDIATE rolls back open work first. Be careful with it on production.

Read More
Gouache painting: two shallow pastry boxes sit end to end on a bakery counter, each holding a single row of identical tarts

smalldatetime: Minute Rounding Can Change the Day

February 9, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

smalldatetime does more than hide seconds. These explicit conversions show minute rounding and a midnight carry, with complete original timestamps retained.

Read More
SQL SERVER - Find the Size of Database File - Find the Size of Log File

SQL SERVER – Find the Size of Database File – Find the Size of Log File

February 8, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table, Transaction Log

A quick script on sys.master_files to find the size of database file and log file in MB. Remove the WHERE clause to see every database on the server.

Read More
Gouache painting: seven wooden stakes stand in a straight row across a white lime line marked on grass, with an apple orchard plot on one side and a pear orchard plot on the other

ISO Week Numbers: Find the Matching ISO Week Year

February 7, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

ISO week numbers can belong to a different year from the calendar date. A Thursday-based calculation keeps the ISO year and week together across December and January.

Read More
SELECT COUNT (*) dialog from humanresources.

SQL SERVER – Stream Aggregate Showplan Operator – Reason of Compute Scalar before Stream Aggregate

February 5, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts

Stream Aggregate is a common showplan operator, even in a simple COUNT(*) plan. I explain why a Compute Scalar often shows up right before it.

Read More
SQL SERVER - Get the List of Object Dependencies - sp_depends and information_schema.routines

SQL SERVER – Get the List of Object Dependencies – sp_depends and information_schema.routines

February 4, 2010
Pinal Dave
SQL Tips and Tricks
SQL Dependency, SQL Scripts, SQL Server, SQL Server Security, SQL System Table

sp_depends can return wrong dependency results where information_schema.routines gets it right. See where it fails and the DMVs recommended in its place.

Read More
Previous 1 … 267 268 269 270 271 272 273 … 366 Next
  • Books
  • Testimonials
  • Privacy Policy

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