T-SQL & Development

Does Bit Column Order Matter in Tables?

At the PGConf.dev, where Postgres developers get together and strategize the work they wanna do for the next version, I attended a session where Matthias van de Meent talked about changing the way Postgres stores columns. As of right now (Postgres 17), columns are aligned in 8-bit intervals, so if you create a table with alternating columns:

Read more about Does Bit Column Order Matter in Tables? 3 comments — Join the discussion
Performance Tuning

Query Exercise Answer: Beating ChatGPT at Finding Good Question Times

For this week's Query Exercise, I asked you to write a better query than ChatGPT wrote. Your goal was to find the best days and times to post questions on Stack Overflow.

I found it interesting that a lot of the initial answers focused on the times when there were the most questions, or which questions were the most highly upvoted. For me, the best time to post a question is when you have the highest likelihood of getting the right answer, quickly.

Read more about Query Exercise Answer: Beating ChatGPT at Finding Good Question Times 2 comments — Join the discussion
Performance Tuning

Query Exercise: Beat ChatGPT at Finding Good Question Times

What are the best days of the week and times of the day to post a question at StackOverflow.com? It seems like a simple question, but it's surprisingly nuanced. I asked ChatGPT's latest version, 4o, and its answer made me laugh out loud. First off, the T-SQL is terrible: it creates a completely unnecessary temp…

Read more about Query Exercise: Beat ChatGPT at Finding Good Question Times 14 comments — Join the discussion
Production DBA

Two Tweaks for Faster Backups with Ola Hallengren’s Scripts

Ola Hallengren's free maintenance solution is widely used as a replacement for SQL Server maintenance plans. It's a more powerful, flexible tool for backups, corruption checking, and index & statistics updates. If you're using it for backups, there are two quick, easy changes that can dramatically reduce your nightly job runtimes. First, set @NumberOfFiles =…

Read more about Two Tweaks for Faster Backups with Ola Hallengren’s Scripts 18 comments — Join the discussion
T-SQL & Development

Coming in Entity Framework 9: Better Query Parameterization

Hallelujah. With current versions of Entity Framework, when developers add a mix of parameters and specific values to their query like this: [crayon-6a781cf77f06d416810910/] See how part of the filter is hard-coded (".NET Blog") while the other part of the filter is dynamically generated, an ID the user is looking for? That causes Entity Framework to…

Read more about Coming in Entity Framework 9: Better Query Parameterization 22 comments — Join the discussion

Updated First Responder Kit and Consultant Toolkit for May 2024

If you've hard-coded installer file names, there's a big change in this release. There are now just 2 installer scripts: Install-All-Scripts.sql, and a new Install-Azure.sql, which only installs the scripts that are compatible with Azure SQL DB. The old Install-Core scripts are gone because we've deprecated sp_AllNightLog, sp_BlitzInMemoryOLTP, and sp_BlitzQueryStore. Read on for why.

Read more about Updated First Responder Kit and Consultant Toolkit for May 2024 7 comments — Join the discussion
T-SQL & Development

The Future of DBAs: History Rhymes

Eitan Blumin recently wrote a post about the future of the DBA career in which he talked about the rise of jack-of-all-trades IT professionals. It's a good post. You should read it. I did, and over the last 20 years, I'm pretty sure I've read a dozen variations of that post.

There's a saying: "History doesn't repeat itself, but it often rhymes."

Read more about The Future of DBAs: History Rhymes 14 comments — Join the discussion