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
Execution Plan for Select Query Using View.

SQL SERVER – Adding Column is Expensive by Joining Table Outside View – Limitation of the Views Part 2

August 26, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL View

Need one more column from a view? Joining table outside view is expensive, and changing the view adds network traffic for every query. Views limitation part 2.

Read More
Two adjacent filter beds contain the same coarse and fine sections in reversed positions.

SQL SERVER – Does Order of Column in WHERE Clause Matter?

August 25, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server

Does the Order of Column in WHERE Clause change a query plan? I invite a runnable example with a controlled comparison.

Read More
An upright piano on a dolly at the foot of narrow stairs while a mover measures the doorway with a string

Assessing a Database Before a Migration

August 24, 2010
Pinal Dave
SQL Tips and Tricks
Compatibility Level, DBA, Query Store, SQL Migration

Assessing a database before a migration covers features in use, compatibility, size, dependencies, and the evidence needed before a date is promised.

Read More
Select from view.

SQL SERVER – ORDER BY Does Not Work – Limitation of the Views Part 1

August 23, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL View

Why ORDER BY does not work in a view: the first limitation of views in my series, shown with an AdventureWorks example. Sort outside the view instead.

Read More
SQL SERVER – Function to Retrieve First Word of Sentence – String Operation

SQL SERVER – Function to Retrieve First Word of Sentence – String Operation

August 20, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

A friend asked for a UDF that returns only the first word of a sentence. Here is my script with CHARINDEX and SUBSTRING, and how to turn it into a function.

Read More
Gouache painting of a stone staircase descending into a sunken orchard corner with the first step painted red

Negative Identity Seed and Negative Increment in SQL Server

August 19, 2010
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Identity, SQL Scripts

A Negative Identity seed lets a column start below zero, and a negative increment makes it count down. This post tests IDENTITY(-1,-1) and IDENTITY(-2147483648,1) on SQL Server 2025, shows gaps after a rollback, DBCC CHECKIDENT, and what to do when an int identity runs out. It also shows SEQUENCE as the flexible alternative.

Read More
Three terracotta bowls, one empty, beside a blue tray with three circular recesses.

CROSS APPLY Aggregate: An Empty Input Can Still Return a Row

August 18, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Joins, SQL Scripts, SQL Server

CROSS APPLY aggregate behavior depends on whether the right-side query actually produces a row. I inspect that query before assuming unmatched customers disappear. An aggregate without GROUP BY can return a row even when its input is empty.

Read More
Previous 1 … 423 424 425 426 427 428 429 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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