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
Title card: Msg 2714: There Is Already an Object Named

SQL SERVER – Fix: There is already an object named ‘MyFirstTable’ in the database

February 23, 2021
Pinal Dave
SQL Tips and Tricks
Primary Key, SQL Error Messages, SQL Scripts, SQL Server

Recently I had a very interesting scenario with a client when they faced an error about already object named that exist in the database.

Read More
nonclustered primary

Nonclustered Primary Key – SQL in Sixty Seconds #119

September 7, 2020
Pinal Dave
SQL Video
Primary Key, SQL Constraint and Keys, SQL in Sixty Seconds, SQL Index, SQL Scripts, SQL Server

I will describe in detail a bit later on during this blog post. Today we are going to learn that it is possible to have a nonclustered primary key. 

Read More
Gouache painting of pears spread evenly across a market table with one vermilion pear in the middle

Nonclustered Primary Key Test: Last Page Insert Waits

May 11, 2020
Pinal Dave
SQL Performance
Primary Key, SQL Constraint and Keys, SQL Identity, SQL Wait Stats, Testing

A nonclustered primary key test shows whether a heap fixes last page insert waits. On SQL Server 2025 it doesn’t, because the key index still rises. A lane layout that spreads the inserts removes the latch wait, and the post shows the cost of that layout.

Read More
Gouache painting of an empty wooden pier ending in a lamp post, small boats bunched around its end and a small vermilion buoy

OPTIMIZE_FOR_SEQUENTIAL_KEY: Test the Last Page Insert Fix

May 6, 2020
Pinal Dave
SQL Performance
Primary Key, SQL Identity, SQL Server 2019, SQL Wait Stats, Testing

OPTIMIZE_FOR_SEQUENTIAL_KEY is an index option that targets last page insert contention. This post tests it with 32 connections that insert into a clustered identity key, with the option off and on. The option changes the kind of waiting, and the post shows how to decide whether it helps your table.

Read More
Illustrated cover: Last Page Contention

SQL SERVER – Last Page Insert PAGELATCH_EX Contention Due to Identity Column

May 5, 2020
Pinal Dave
SQL Performance
Primary Key, SQL Constraint and Keys, SQL Identity, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Wait Stats, Testing

Today’s goal is to understand what is the Last Page Insert PAGELATCH_EX Contention Due to Primary Key. Let us start understanding it together.

Read More
Two toggle clamps securing a wooden piece against separate reference blocks

Foreign Key Checks in Insert Plans: The Cost of Each Constraint

June 13, 2019
Pinal Dave
SQL Tips and Tricks
Primary Key, SQL Constraint and Keys, SQL Server

Before you drop a foreign key to speed up a load, look at what it costs. This walk-through shows the Assert, the two parent lookups, and the trust trap.

Read More
A pebble tumbler holds varied stones while two similar stones lie beside it

Generating Unique, Hard-to-Guess Voucher Codes in T-SQL

December 17, 2013
Pinal Dave
SQL Tips and Tricks
Primary Key, SQL Random, SQL String

Random-looking codes can still be guessed. Build 20 voucher codes from random bytes, check them, and make redemption single-use.

Read More
1 2 3 Next
  • Books
  • Testimonials
  • Privacy Policy

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