messy paint

Why you should not use SELECT *

A shorter post this week, but an important one. Last week, Erik Darling commented on my post saying that we shouldn’t use SELECT *, which was both amusing and accurate. Amusing, because a number of the example T-SQL queries in that post made use of this construct. Why not? Why was Erik’s comment accurate? A
-> Continue reading Why you should not use SELECT *

Post image

Performance as a feature, software developer edition

Relational database management systems (RDBMS) like SQL Server and Azure SQL Database are very good at managing normalized data. Efficient storage and retrieval of data is the name of the game, so performance is a feature. That’s why SQL Server (and other RDBMS products in the market) keep as much of the data in memory
-> Continue reading Performance as a feature, software developer edition

Virtual Log Files: 200 or 1000?

Last week I had the privilege of reviewing possibly the best SQL Server production environment I’ve seen in Canada. During the follow-up meeting, the senior DBA and I had a discussion about Virtual Log Files (VLFs), disagreeing on the maximum number of Virtual Log Files a transaction log should have. I said 200, he said
-> Continue reading Virtual Log Files: 200 or 1000?

the world is on fire

Secure or fast? Secure, obviously …

By now you have probably seen the news about a major flaw in the design of CPUs from all major vendors (Intel, AMD, and ARM) resulting in a series of vulnerabilities in operating systems and … web browsers? One of my favourite things to do is to make queries run faster. What the Meltdown and
-> Continue reading Secure or fast? Secure, obviously …

No moving parts, the story of persistent memory

In November 2017, during the PASS Summit keynote, Microsoft’s Bob Ward (Principal Architect) demonstrated a “diskless database” running on Hewlett-Packard Enterprise (HPE) hardware. The storage layer is known as “persistent memory”. At the end of November, Bob and his colleague Jamie Reding (Senior Program Manager) wrote a blog post about this new thing, which you
-> Continue reading No moving parts, the story of persistent memory

SQL Server 2017 Administration Inside Out

For the last five months or so, I have been helping some really smart people put words on paper, both the physical and electronic kind, which is hopefully going to culminate in an actual technical book that I can point to and say “Yes, that’s the name I invented for myself when we moved to
-> Continue reading SQL Server 2017 Administration Inside Out

Gimmicks that work: XEvent Profiler in SQL Server Management Studio

[2018-07-03 edit: The original name of this feature was XE Profiler, but it was changed to XEvent Profiler in SSMS 17.4.] I have a favourite new feature of SQL Server Management Studio 17 (SSMS), and that’s XEvent Profiler, which allows you to monitor your instance in real time using Extended Events from inside SSMS with just
-> Continue reading Gimmicks that work: XEvent Profiler in SQL Server Management Studio

A trillion and one

Joe Obbish wrote an epic post a few weeks ago about loading a trillion rows into a non-partitioned table in SQL Server, using a clustered columnstore index to maximise the compression. (Short version: it’s very slow to query. Don’t do it. Bad things happen. I have an ongoing investigation with Ewald Cress about the evil
-> Continue reading A trillion and one

Post image

What you need to know about memory limits on SQL Server

Last week, I posted this statement on Twitter, along with a screen capture of the official Microsoft documentation: Reminder: Max Server Memory is *not* just for the buffer pool. The RAM limit Standard Edition can use *is* just for the buffer pool. Joey D’Antoni was quick to remind me that this only applies to SQL
-> Continue reading What you need to know about memory limits on SQL Server