The Bit Bucket

SDU Tools: Update Statistics on SQL Server Tables

SDU Tools: Update Statistics on SQL Server Tables

Having up to date statistics is critical for SQL Server choosing appropriate query plans. Poor statistics can lead to poor query plan outcomes.

Generally, SQL Server manages this well by itself. As a rough rule, most versions auto-update statistics when the number of changes is about twenty percent of a count of the number of rows in the table. (Some recent changes have slightly altered how this works but the ball park is pretty good).

2026-11-10

SQL: Should you use bit columns?

SQL: Should you use bit columns?

I’ve previously discussed why bit columns can be useful in SQL Server Indexes. But an interesting question is whether you should use them at all.

I previously showed an example of a transaction table that had an IsFinalized column. And if it did, then it’s very likely that I’d want to have it indexed. But what I didn’t discuss was whether that bit column made sense in the first place.

2026-11-09

PG Down Under is now PGSQL Down Under

PG Down Under is now PGSQL Down Under

A few years back, I created a new podcast to focus on PostgreSQL. I had already registered a number of down under names like sqldownunder.com, cosmosdownunder.com, fabricdownunder.com and so on. So it seemed logical to register pgdownunder.com. I checked and it was available so I used it for the podcast, and have done ever since.

A while back though, I became aware of a local PostgreSQL conference, and that they called it PG Down Under. Curiously, they hadn’t registered that name, or even the .org variant.

2026-11-08

SQL - Fabric: FABCON and SQLCON are coming to Sydney in April 2027 - Discounts now

SQL - Fabric: FABCON and SQLCON are coming to Sydney in April 2027 - Discounts now

It’s awesome that FABCON is coming to Sydney early next year. It’s now one of the best conferences each year globally and has loads of Fabric and SQL goodness. Our friends at Microsoft have provided this info to let you get an early bird discount.

Register today and Save AUD$300 with code: FABSQL-UG

The APAC Microsoft Fabric + SQL Community Conference (6–9 April 2027, ICC Sydney) brings together data, analytics, BI, and AI professionals from across Asia-Pacific. Hear from Microsoft and community experts with practical guidance, real-world patterns, and lessons learned.

2026-11-07

Book Review: The Psychology of AI Adoption at Work

Book Review: The Psychology of AI Adoption at Work

I’ve spent a lot of time lately considering the ethics surrounding AI usage in the workplace, but the title of a new book had me intrigued. I was sent a review copy of The Psychology of AI Adoption at Work: From Resistance to Results by the author.

Author

Dr. Gleb Tsipursky is a behavioural scientist, author and consultant who specialises in workplace change, decision-making and the future of work. He is the CEO of Disaster Avoidance Experts, a consultancy that helps organisations adopt new technologies and improve business performance. He previously spent more than 15 years in academia, including seven years as a professor at Ohio State University. He has written eight books and has been featured in publications including Harvard Business Review, Forbes and The New York Times, which described him as an office whisperer.

2026-11-06

SQL: Does having more indexes always make data modifications slower?

SQL: Does having more indexes always make data modifications slower?

As I’ve pointed out in other posts, Betteridge’s Law of Headlines says you already know that the answer to this is no.

There is a persistent myth among SQL Server users that having more indexes always slows things down, particularly anything that needs to modify data (INSERT, UPDATE, DELETE, MERGE).

However, there are two aspects of this to consider:

The first is that you need to decide how much the modifications actually matter in the overall performance of the system. In an earlier blog post, I noted that when I trace typical transactional systems, I often see reads making up about 99% of page I/O’s. Writes barely even appear. I’m not saying they are irrelevant but you need to focus on what the system is spending most of its time doing.

2026-11-05

SQL: Scripting SQL Server objects and data from the command line

SQL: Scripting SQL Server objects and data from the command line

The other day I posted a shortcut article about how to use SQL Server Management Studio (SSMS) to generate INSERT statements for data.

In one of the comments, a reader asked if there was a way to do that from the command line.

The answer is yes, sort of. Apart from a variety of 3rd party tools, a few years back, Microsoft released tools to do just that.

The easiest tool was probably mssql-scripter and you’ll find an intro to it here:

2026-11-04

SQL: Which SQL Server columns should be nullable part 2: Avoid placeholder values

SQL: Which SQL Server columns should be nullable part 2: Avoid placeholder values

In a previous post , I was discussing why magic values were a problem. They are often added by developers when they are trying to avoid having any NULL data in a database.

While discussing this, I think it’s worth also highlighting the overall dangers of placeholder values. These are values that aren’t magic values but are ones that are intended to be replaced at a later time.

If you use any of these, you need to have a solid process in place to:

2026-11-03

Book Review: Hands-on Financial Trading with Python (2nd Edition)

Book Review: Hands-on Financial Trading with Python (2nd Edition)

In recent years, I’ve done a lot of consulting work with companies who are involved in financial trading. Invariably nowadays, they have leaned heavily on using Python. I recently received an early review copy of Hands-on Financial Trading with Python (2nd Edition): Build, backtest, and deploy professional trading strategies using a proven end-to-end framework from my friends at PacktT.

NOTE: This is the second edition of this book. I haven’t previously read the first edition.

2026-11-02

Fix: PowerPoint - sorry we couldn't find slide1.PNG - Unexpected space

Fix: PowerPoint - sorry we couldn't find slide1.PNG - Unexpected space

Recently, I was having trouble saving a PowerPoint slide deck as a set of PNG files.

The error message said:

Sorry we couldn’t find slide1.PNG. Is it possible that it was moved, renamed, or deleted?

After trying to copy the slides into another deck to replace the original deck, the same problem existed. Saving in PPTX format was fine. Curiously, saving individual slides was also fine.

I found a few blog posts online that said it might be to do with an embedded period in the filename. That wasn’t the case but it gave me the clue that I needed.

2026-11-01