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
A removable local doorway stop blocks a new shelf assembly from one specific work area.

SQL SERVER – Trigger on Database to Prevent Table Creation

August 23, 2021
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Trigger

A Trigger on Database scope can reject CREATE_TABLE events. A customer required this rule, though I preferred ordinary permissions.

Read More
Gouache painting of a sunny courtyard with wooden stools holding saplings, the front stool vermilion

Index a Computed Column in SQL Server

August 20, 2021
Pinal Dave
SQL Performance
Computed Column, SQL Index, SQL Performance, SQL Scripts

To index a computed column, define the formula once on the table and create a normal index on it. This post loads 200,000 rows, shows the scan, then the seek after the index, and tests the rules that decide whether SQL Server accepts the column.

Read More
Gouache painting of three sacks of lentils in three sizes, each with a vermilion scoop

Size and Rows of Each Table in SQL Server, Indexes Included

August 18, 2021
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL DMV, SQL Scripts, SQL Server

To list the size and rows of each table, add up the pages from sys.dm_db_partition_stats and split them into data, index and unused space. This post shows three traps in the common join query and checks the corrected result against sp_spaceused.

Read More
Gouache painting of two open trunks of quilts, one nearly full and one half empty with a vermilion quilt on top

Free Space in Database Files: Check Data and Log Files

August 16, 2021
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Scripts, SQL Server, Transaction Log

To see the free space in database files, compare each file’s size with the pages it uses. This post gives one query for data and log files, adds the free space on the drive, and checks the log figure against a second source.

Read More
Old and new drawer fronts are compared beside preserved vessels and supporting fittings.

SQL SERVER – Rename View

August 13, 2021
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL View

When I rename view objects, I inspect references and retained definitions first. SSMS and sp_rename both need dependency planning.

Read More
A worn shuttle is inspected over its finite work area beside a fresh unworn tool.

SQL SERVER – High Frequency Cached Query Counts and Statement Metrics

August 12, 2021
Pinal Dave
SQL Performance
SQL Cache, SQL DMV, SQL Scripts, SQL Server

I measure High Frequency cached statements with decimal executions-per-second arithmetic. A customer wanted to identify the busiest queries.

Read More
Distinct storage and work controls share a finite bench while an obsolete mechanism remains covered.

MySQL Performance – Five Configuration Topics with Version Limits

August 10, 2021
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Memory, SQL Scripts

A MySQL Config File needs settings matched to its server version and workload. I measure pressure before changing a parameter.

Read More
Previous 1 … 6 7 8 9 10 11 12 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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