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
Gouache painting of three neat crates of pears beside a loose heap of peaches on a red cloth

Count Rows and Indexes for Every Table in SQL Server

October 10, 2012
Pinal Dave
SQL Performance
Clustered Index, SQL Heap, SQL Index, SQL Scripts

To count rows and indexes for every table, one query on the catalog views answers four questions at once: how many tables, which are heaps, how many nonclustered indexes each has, and how many rows each holds. The post tests it on a demo database and explains where the row count comes from.

Read More
SQL SERVER - Identify Numbers of Non Clustered Index on Tables for Entire Database

SQL SERVER – Identify Numbers of Non Clustered Index on Tables for Entire Database

October 9, 2012
Pinal Dave
SQL Tips and Tricks
SQL Index

Here is a script that counts each non clustered index on tables across the entire database, and the small story of why I wrote it.

Read More
A gardener lifting white frost covers one by one along a vegetable row on a frosty morning.

SARGable Date Filters: Stop Wrapping Columns in Functions

October 5, 2012
Pinal Dave
SQL Performance
SQL DateTime, SQL Function, SQL Index, SQL Performance, SQL Server

Write SARGable date filters as half-open ranges for years, months, days, and rolling windows, then compare plans and logical reads.

Read More
SQL SERVER - SQL Server Statistics Name and Index Creation

SQL SERVER – SQL Server Statistics Name and Index Creation

September 17, 2012
Pinal Dave
SQL Performance
SQL Error Messages, SQL Index, SQL Scripts, SQL Server, SQL Statistics

Guest author Sandip hit Msg 1913 while creating an index, because an index or statistics with that name already existed. A lesson on statistics name and index creation.

Read More
Gouache painting of beach pebbles in loose clusters, two similar round pebbles close together, one vermilion, and a jagged stone far away.

VECTOR_SEARCH in SQL Server 2025: Finding Similar Rows With a Vector Index

September 5, 2012
Pinal Dave
AI
AI, SQL Index, SQL Scripts

VECTOR_SEARCH returns the rows whose vectors sit closest to a vector you give it, and a vector index makes that search approximate and fast. This post builds a six-row test with hand-made numbers on SQL Server 2025, with no AI model, and lists the limits the test showed.

Read More
Two halves of a snap fastener join as one connection despite being presented from opposite sides

Unique Pairs in Either Order: Blocking A-B When B-A Exists

August 20, 2012
Pinal Dave
SQL Tips and Tricks
Computed Column, Duplicate Records, SQL Constraint and Keys, SQL Index

A plain unique index treats (1, 2) and (2, 1) as different rows. Two computed columns and one index fix that, and I test the awkward cases.

Read More
A cloakroom rail of identical dark coats, each hanger carrying a small tag in a different colour.

What Is a Primary Key, and What Happens Without One?

August 14, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Index, SQL Server

A primary key is the promise that every row can be told apart. Why NULL is refused, what a table without one actually costs you, how it differs from a unique constraint, and when to choose a natural key over a made up one.

Read More
Previous 1 … 30 31 32 33 34 35 36 … 64 Next
  • Books
  • Testimonials
  • Privacy Policy

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