@pinaldave

I am SQL Server Performance Tuning Expert at @SQLAuthority

Joined May 2007
SQL Server is changing. AI is changing how we work with databases. I spend my time exploring where the two meet. Here you will find: SQL Server performance tuning Query tuning and troubleshooting Practical AI ideas for DBAs Real-world scripts and demos Lessons from actual performance problems No hype. No fluff. Just practical learning around SQL Server, performance, and AI. Follow if that is your kind of content.
1
1
37
10,978
Your SQL Server may NOT be slow. 😮 A query takes 50 ms near SQL Server, but the application takes 8 seconds. Why? 4,000 tiny database calls × 2 ms network latency = 8 seconds. Sometimes the biggest performance problem is not the query. It is the round trips. blog.sqlauthority.com/2026/1… #SQLServer #PerformanceTuning #Database
1
2
771
This SQL Server 2025 cheat sheet puts the T-SQL I use every day on 4 printable pages. Every query on it ran on SQL Server 2025 before it went in. All the scripts are below, so you can copy them. I kept one rule while building it: no code on the sheet that I hadn’t run. Each block ran on SQL Server 2025 CU9 against a small demo database, in the same order as this post. Anything that failed, I fixed or dropped. One new string function didn’t make it, because it still needs a preview switch.Each block on the sheet carries a small label: read only, changes data, changes objects or changes server. Print it on both sides and it fits on 2 sheets of paper. blog.sqlauthority.com/2026/1… grab it before it gets old!
2
3
10
1,475
Is the larger Context window back or some configuration issue?
3
827
The backup that disappeared was one of six on the shelf. Another card changed places. Which one is missing? A backup shelf is one of those places where a quick glance can lie. A row of boxes looks complete until the day you need one particular box. This is a paper puzzle, not a claim about any real backup system, but the feeling is familiar. The upper shelf is BEFORE. The lower shelf is AFTER. Both show three positions in each of two rows. One card moved to a different position and one card disappeared. Your job is to name the card that is missing. The question mark tells you where there is a gap, but it does not tell you the name of the missing card. Compare the names, not just the positions. Try it without writing the list down. If you find yourself counting slots instead of reading labels, that is exactly the trap. The six-card layout was kept large enough to read on a phone, so no magnifying glass is required.
1
2
948
I called my DOT, but they did not pick up my call. I forgot it is Sunday today.
4
1,063
AI row count estimates arrive with tremendous confidence. Cardinal said four hundred. The query returned nine million. blog.sqlauthority.com/2026/1…
2
1,041
SQL Server Developer Edition: Free Download Links From SQL Server 2017 to SQL Server 2025 Two questions come up again and again. Which download should I pick for a demo, a class or a new project? And a week later: can we keep using it for the real app? Start with the download table below, then read the production limits before you build anything on it. blog.sqlauthority.com/2026/1…
3
1,008
AI Basics: The Four Circles, and Four More Questions Part one of ten. Most AI interview questions start here, even for senior roles. Someone asks you to explain a large language model in plain words, and your answer tells them more than your resume does. 1. What is the difference between AI, machine learning, deep learning and generative AI?Think of four circles, one inside the next. AI is the widest: any system that does work we’d call judgment. Machine learning sits inside it and learns patterns from data instead of hand-written rules. Deep learning uses many-layered neural networks, and everyday generative AI uses them to create something new. DataWarehousing GuideWhy it matters. All four can show up in one data platform. A fraud score trained on last year’s transactions is machine learning. The assistant that drafts your query is generative AI. blog.sqlauthority.com/2026/1…
1
3
1,278
The fog after a layoff shows up before the grief does, and nobody warns you about it. The mind that carried a whole career can’t hold a grocery list. It’s frightening. It’s also normal, and it lifts. I’ve written about the last day in A Letter for the Night Your Job Ends. The money got its own post, Jobs Are Disappearing Quietly. This one is about the weeks in between, when your own mind feels like a road you can’t see. One note first: I’m not a doctor or a therapist, and this isn’t medical advice. For twenty-five years, companies have called me on their worst day. I’ve watched a lot of people walk through the weeks after a job ends. This is what I’ve seen help. Read more here: blog.sqlauthority.com/2026/0…
2
991
It would nice to have a wake code for DOT like Hey Google or Alexa or something. Currently we have to make a call to start the conversation. @OpenAI or it may be there and I missed.
1
1,009
The Puzzle, With Pins and String Picture a corkboard, a box of pins and a spool of red string. Cut every piece of string to exactly the same length. Now push in some pins, and stretch a string between every pair that sits exactly that far apart. The question sounds simple. With a hundred pins, or a million, what is the largest number of strings you can fit? You can place the pins anywhere you like. Every string has to be exactly one unit long, though, not almost. Small cases are fun to play with. Three pins in an equilateral triangle give three strings. Four pins in a diamond of two such triangles give five. Seven pins, a regular hexagon around a center pin, give twelve. Read: blog.sqlauthority.com/2026/0…
978
Your SQL query did not change. Your indexes did not change. Your server did not change. So why did the query suddenly become slow? One possibility that is surprisingly easy to overlook: SQL Server statistics are describing yesterday’s data. The Query Optimizer makes decisions based on statistics. It uses them to estimate how many rows will be returned, then chooses joins, memory grants, access methods, parallelism, and ultimately the execution plan. If those statistics no longer represent the current data, SQL Server can make a perfectly reasonable decision based on completely outdated information. I recently tested this on SQL Server 2025. I created a table with 1 million rows spread across 400 days, then added 20,000 new rows for today without crossing the statistics refresh threshold. The query returned 20,000 rows. But the estimate? Current Cardinality Estimator: 6,000 rows Legacy Cardinality Estimator: 1 row Yes. One. In another test, stale statistics with legacy estimation resulted in 120,043 logical reads. After updating the relevant statistic, the estimate became 19,867 rows and the resulting plan used 18,220 logical reads. The important lesson is not simply: "Update statistics and everything becomes faster." It is this: When SQL Server performance changes without an obvious reason, compare estimated rows with actual rows. Sometimes the optimizer is not making a bad decision. It is making the best decision it can using an outdated description of your data. I explain the experiment, auto-update thresholds, sampling, the ascending key problem, FULLSCAN, PERSIST_SAMPLE_PERCENT, and what you should actually check in production here: blog.sqlauthority.com/2026/0… Have you ever fixed a mysterious SQL Server performance problem simply by updating statistics? #SQLServer #DatabasePerformance #PerformanceTuning #SQL #Database #DBA #QueryOptimization #MicrosoftSQLServer
7
1,020
May be we all got this wrong - They may be reducing the API costs so much that current $200 plan will have better usage than what we are getting today.
Hi, Tomorrow we are re-opening the Pro $200 subscriptions to new subscribers, but together with it we are also changing how we calculate the usage for it. In effect, if you do the math, it will net out at half the dollar in API spend compared to the old Pro $200 plan. Now that it's said, let me explain why this is happening and why you will still get more work done than if you were on the Pro $200 subscription one month ago. (a) We didn't want to compromise in other ways and are committing to not reintroducing the 5h limit, so that you can fully use the weekly usage when you want. (b) On the subscription, we guarantee that over time you always get more work done and with an increasing level of quality. This means that you will continue to get more value per dollar spent as a result of models getting more efficient and us passing down the improvements in the form of API price reductions. (c) We don't want to put an incentive on ourselves to artificially inflate the API list prices to make it look like you are getting a lot (and workaround it through discounts, etc). Instead we want to continue to both rapidly reduce prices and increase capabilities of models on the API. This week we introduced GPT-6 Sol and GPT-6 Luna at 50% of their previous price. Over time, we see prices go low enough that it makes sense for most to buy usage as needed without there being a significant gap between what you get in a subscription and what you get in the API for a dollar spent. (d) Tomorrow, we are adding more things to the subscription that won't draw on the usage, I won't reveal what that is yet. I wanted to be transparent before all the big announcements tomorrow. Lots of new exciting things are coming to the subscriptions that will make it super compelling, but I wanted to make sure to share this change ahead of time so you can all understand it before we shower you with good news. Codexingly, Tibo
1,211
AI Generated ETL Worked on Day One. Then Came Monday. The job itself was nothing special. A vendor drops a CSV file on a share every morning. We check it, fix up a few columns, and merge about three hundred thousand rows into a warehouse table. If you work with data, you’ve built this job more than once. I described the source, the target and the rules, and asked AI to write it. What came back was good. It had a staging table, a proper merge, logging, and sensible error handling around the file read. It ran on the first try, the numbers matched, and everybody was happy. I’ll admit I was a little disappointed. I had a whole “I told you so” ready. The job it replaced was written in 2016 by someone who had left the company years ago. It wasn’t pretty. It had odd IF checks, a hash lookup, and a wait loop nobody could explain. On day one, the new code was better, and I’d have said so to anyone who asked. blog.sqlauthority.com/2026/0… read More
1
996
Two query lines are on the page. One looks longer. Look once, make a choice, and then look again. I have spent years looking at execution plans. The lines, boxes and arrows can make an expensive operation look important before I have read a single number. That is useful when the picture points me to a place worth investigating. It is less useful when I start treating the size of a drawing as evidence. For today's Sunday puzzle, look at the two dark horizontal lines in the picture. The upper one sits near the narrow end of a server aisle. The lower one sits near the wide end. Do not measure them yet. Which line looks longer to you? If someone else is nearby, ask them before you scroll. It is more fun when two people are confidently wrong in different directions. The illustration was drawn to a fixed grid. There is no animation and nothing changes when you look away. Give your eyes five seconds, then read the answer. blog.sqlauthority.com/2026/0…
1
1
2
993
My 18th & 19th books are here! I never expected “100 AI Interview Questions” to receive so much love. It’s on track to outsell “AI: Nobody’s in There.” Seems this was what people needed. Thank you ❤️ blog.sqlauthority.com/2026/0… blog.sqlauthority.com/2026/0…
986