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 - Introduction to Rollup Clause

SQL SERVER – Introduction to Rollup Clause

February 24, 2010
Pinal Dave
SQL Tips and Tricks
Business Intelligence, SQL Scripts, SQL Server

An introduction to the Rollup Clause in SQL Server, which aggregates at several levels of a hierarchy. A population table by country, state and city shows how.

Read More
Gouache painting: on a dyer's table, a slate-blue silk square partly overlaps a cream one, the shared corner showing a blended deeper tone while each square extends beyond it

geometry STOverlaps: Intersection Alone Is Not Enough

February 22, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STOverlaps asks a narrower question than whether two shapes share any points. I test equal and contained regions alongside a partial overlap. Those intersecting cases do not all satisfy the method’s overlap definition.

Read More
SQL SERVER- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)

SQL SERVER- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)

February 21, 2010
Pinal Dave
SQL Puzzle
Best Practices, SQL Scripts

Is IF EXISTS(Select null from table) faster than IF EXISTS(Select 1 from table)? A great comment thread by Divya, Brian and Marko answers it.

Read More
SQL SERVER - Recompile Stored Procedure at Run Time

SQL SERVER – Recompile Stored Procedure at Run Time

February 20, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Stored Procedure

Two ways to recompile a stored procedure at run time in SQL Server: add WITH RECOMPILE when you create it, or ask for a one-time recompile.

Read More
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
Previous 1 … 266 267 268 269 270 271 272 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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