Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

Black Friday Gadgets

It's the end of my week in the US, with Thanksgiving tomorrow and Black Friday off. I'm not taking Black Friday off, nor am I planning on shopping, but some of you might be. Or maybe your parents/children/partners/friends are, and you want to give them a few hints on what to get you. Black Friday (and now Cyber Monday) have become big shopping days. Don't forget about Giving Tuesday as well, as it's a great time to remember there are others in the world, some of them worse off than you.

As I get older, I'm often looking to get less stuff, so I am less attracted to gadgets that are fun or interesting. I tend to be more practical. I'm likely replacing a broken bathroom fan, which might be my big purchase for November. My wife and I have enjoyed a few cruises in the last few years, and I've gotten no shortage of "deals" for Friday. However, since I seem to get the "deal of the century" every other day from companies, I'm not sure I'll do any vacation planning today.

These days it seems like the pace of innovation has slowed, though not the incremental improvements in both features and price for many gadgets. I don't know I've seen anything in a mobile phone or watch that's excited me in quite a few years. Laptops are, well, they're great, and they get more powerful, but nothing seems that exciting, despite the best efforts of marketing departments from Apple and Microsoft.

These days you might be thinking differently. Maybe you want home automation, but under your control. Perhaps adding in camera integration, but controlling your data? Perhaps you want to get some hand-crafted accessories, like a wooden charging station or a metal desk organizer. Maybe a shirt, not one for me, but maybe one you enjoy that showcases some interest. Perhaps chemistry, physics, data-related, or even a good AI joke.

Perhaps you're looking for something fun, or something practical, or maybe just a good value. In any case, let us know what you would love to get as a gift, what excites you, what looks interesting, or maybe where you'd rather spend your money.

Happy holidays, and I hope you have a quiet rest of the week.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 Featured Contents
SQLServerCentral Article

Protecting Multi-Step Data Changes with TRY...CATCH and XACT_ABORT in SQL Server

Imran2629 from SQLServerCentral

This article looks at multi-statement DML commands and how you can ensure your transaction handling works correctly.

External Article

5 common SQL Server transaction problems (and how to solve them)

Additional Articles from SimpleTalk

Five practical SQL Server transaction problems — dirty reads, non-repeatable reads, phantom reads, rollback behavior, and nested transactions

Blog Post

From the SQL Server Central Blogs - SSMS Is Getting Smarter—and This Isn’t Just About Writing SQL

SQLEspresso from SQLEspresso

Continuing with my takeaways from SQLCon and FabCon Europe in Barcelona, let’s talk about something almost every SQL Server DBA uses: SQL Server Management Studio.There were several SSMS announcements...

Blog Post

From the SQL Server Central Blogs - Why AI isn’t paying off yet, and what to invest in first

Joyful Craftsmen from Joyful Craftsmen Blog

Why isn’t AI paying off yet? Drawing on lessons from digital transformation, Joyful Craftsmen Group CEO Ivan Jelic explains what leaders can do to turn AI investment into business...

Learn Microsoft Fabric: A practical guide to performing data analytics in the era of artificial intelligence

Site Owners from SQLServerCentral

A step-by-step guide to harness the power of Microsoft Fabric in developing data analytics solutions for various use cases

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Switching Schema III

I run these queries:
SELECT COUNT(*) FROM dbo.Beer
SELECT COUNT(*) FROM etl.beer
I get 25 as the result for dbo.beer and 1 for the result for etl.beer. Both tables have identical sructures and both of these are nonpartitioned tables. I run this code:
ALTER TABLE dbo.beer switch TO etl.beer
go
SELECT COUNT(*) FROM dbo.Beer
SELECT COUNT(*) FROM etl.beer
What happens?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

The Speed of Count

Which of these might run quicker on the AdventureWorks database in SQL Server 2025?

-- A
select count(*) from AdventureWorks.Sales.OrderDetail

-- B
select count(1) from AdventureWorks.Sales.OrderDetail

-- C
select count(OrderDetailID) from AdventureWorks.Sales.OrderDetail

Answer: All are the same

Explanation: All of these are the same. The COUNT(x) doesn't really matter what X is. Ref: How indexes are used with COUNT in SQL Server - https://drsql.link/2026/01/14/how-indexes-are-used-with-count-in-sql-server/

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


Anything that is NOT about SQL!
Life hack that has worked well for me - I wrote about this several years ago but will contribute again a life hack that has helped me.  It comes to mind again as I have just had to have a new pair of glasses made again because they did not follow my prescription.  Many of us spend many hours looking at computer displays, in […]
Editorials
Pay for Performance - Comments posted to this topic are about the item Pay for Performance
People Matter - Comments posted to this topic are about the item People Matter
Helping an English Student with R - Comments posted to this topic are about the item Helping an English Student with R
PASS Summit Week - Comments posted to this topic are about the item PASS Summit Week
Article Discussions by Author
Server-level Roles - Comments posted to this topic are about the item Server-level Roles
Tracking Inserted, Updated, and Deleted Rows with SQL Server OUTPUT - Comments posted to this topic are about the item Tracking Inserted, Updated, and Deleted Rows with SQL Server OUTPUT
Adding Bits I - Comments posted to this topic are about the item Adding Bits I
Implementing System-Versioned Temporal Tables in SQL Server: A Practical Guide - Comments posted to this topic are about the item Implementing System-Versioned Temporal Tables in SQL Server: A Practical Guide
Switching Schemas I - Comments posted to this topic are about the item Switching Schemas I
Enforcing Unique Customer Emails When Duplicates Already Exist - Comments posted to this topic are about the item Enforcing Unique Customer Emails When Duplicates Already Exist
Too Many Choices - Comments posted to this topic are about the item Too Many Choices
Table Partitioning in SQL Server: A Practical Guide to Managing Very Large Tables (VLDBs) - Comments posted to this topic are about the item Table Partitioning in SQL Server: A Practical Guide to Managing Very Large Tables (VLDBs)
SQL Server 2022 - Development
Trying to make this faster using not exists - Hi I have this query that is slow during the 'not in' part of the statement: LEFT JOIN dbo.benefitplan BP ON BP.benefitplan_id = ci.benefitplan_id LEFT JOIN dbo.benefitplan_type pt ON pt.benefitplan_type_id = BP.benefitplan_type_id WHERE k.BatchSeq BETWEEN '1' AND '1000000' AND ci.claim_procedure_id NOT IN (35381320,35381310,35381304,35381305,35381311,35381306,35345478,35381307,35381293,35381308,35392585, 35392587,35381298,35381321,35345407,35381324,35392582,35381326,35381299,35381325,35381295,35381323,35345410,35381297, 35336186,35381314,35345409,35381319,35392584,35336187,35336218,35336217,35381312,35381294,35381303,35381296,35381318, 35381300,35381327,35381315,35381317,35336185,35381309,35381322,35392586,35381313,35345408,35392583,35345477,35381316) where k.BatchSeq BETWEEN '1' AND '1000000' So I thought […]
Slow - Linked server query - Hi I have this slow query that is pulling data from a linked server. This is the slow part of the statement: SELECT c_sub.claim_id, MAX(cs.status_type) AS clm_status_type FROM dbo.tblBatchKeys k_sub INNER JOIN [SQL22.CARE.NET\SQL22NODEASTAGE]PROD.dbo.claim c_sub ON c_sub.claim_id = k_sub.claim_id INNER JOIN [SQL22.CARE.NET\SQL22NODEASTAGE].PROD.dbo.claim_procedure ci_sub ON c_sub.claim_id = ci_sub.claim_id AND ci_sub.claim_procedure_id = k_sub.claim_procedure_id INNER JOIN [SQL22.CARE.NET\SQL22NODEASTAGE].PROD.dbo.claim_procedure_status cs ON […]
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -