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
Tongs select individual fruit while a shovel would scoop everything

How to STOP the Usage of SELECT * For Views? – Interview Question of the Week #193

September 30, 2018
Pinal Dave
SQL Interview Questions and Answers
SQL Error Messages, SQL Scripts, SQL Server, SQL View

How do you stop people from using SELECT * in views? A slow query in a Health Check came from SELECT * over a wide view, so here is one way to prevent it.

Read More
A fitted drill chuck and bit with the hand drill drive disengaged

Checking Optional Features Installed on an Instance From T-SQL

September 29, 2018
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Performance, SQL Server

A 1 in SERVERPROPERTY does not mean the feature runs. Here is how I line up the flag, the setting and the service in one query.

Read More
Gouache painting of calendar cards arranged through the seasons

Formatted Date Alias in ORDER BY: Sort by the Real Date in SQL Server

September 28, 2018
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Order By, SQL Scripts

A formatted date alias can change ORDER BY from a date sort into a text sort. The tests here reproduce the wrong order, show three ways to sort by the real date, and explain the two errors you hit when you try to be clever with the alias.

Read More
A hand washing with a thin worn sliver of soap while a new red bar dries on the windowsill.

Asynchronous Statistics Updates: When They Help and When They Hurt

September 27, 2018
Pinal Dave
SQL Performance
Execution Plan, SQL Performance, SQL Server, SQL Statistics

Evaluate asynchronous statistics updates against compile latency, data-change timing, and low-priority metadata locking in SQL Server.

Read More
A rowboat with an oversized oar laid across it, sticking out both sides, a red ribbon on the handle

Index Key Size Limits: 900 and 1,700 Bytes Explained

September 26, 2018
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Error Messages, SQL Index, SQL Server

Check index key size against the 900-byte clustered and 1,700-byte nonclustered limits, then narrow keys without losing query semantics.

Read More
Two identical dollhouses side by side, each with lights on in different rooms.

Intelligent Query Processing: Checking What Is On per Database

September 25, 2018
Pinal Dave
SQL Performance
Compatibility Level, SQL Performance, SQL Server, SQL Server 2019

Check intelligent query processing by database compatibility level, scoped switches, and actual plan evidence before comparing servers.

Read More
A small sample dish holds selected tiles beside a larger populated source tray.

SQL SERVER – Selecting Random n Rows from a Table

September 24, 2018
Pinal Dave
SQL Tips and Tricks
SQL Random, SQL Scripts, SQL Server

To select random-looking n Rows, I can sort by NEWID and use TOP. A developer wanted ten AdventureWorks Product rows.

Read More
Previous 1 … 196 197 198 199 200 201 202 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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