<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Authority with Pinal Dave</title>
	<atom:link href="https://blog.sqlauthority.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sqlauthority.com/</link>
	<description>SQL Server Performance Tuning Expert</description>
	<lastBuildDate>Sat, 15 Aug 2026 09:25:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.sqlauthority.com/wp-content/uploads/2016/04/pinalsmall.jpg</url>
	<title>SQL Authority with Pinal Dave</title>
	<link>https://blog.sqlauthority.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">107185061</site>	<item>
		<title>The Job That Was Never There</title>
		<link>https://blog.sqlauthority.com/2026/08/31/the-job-that-was-never-there/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-job-that-was-never-there</link>
					<comments>https://blog.sqlauthority.com/2026/08/31/the-job-that-was-never-there/#respond</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Mon, 31 Aug 2026 01:30:06 +0000</pubDate>
				<category><![CDATA[GenAI]]></category>
		<category><![CDATA[SQL Jobs]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=203287</guid>

					<description><![CDATA[<p>The job that was never there is the hardest one to explain. After the last post, my inbox filled up for four days. The hardest messages were not from people who had lost a job. </p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/31/the-job-that-was-never-there/" data-wpel-link="internal" rel="noopener noreferrer">The Job That Was Never There</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>The job that was never there is the hardest one to explain. After the last post, my inbox filled up for four days. The hardest messages were not from people who had lost a job. They were from people who had gone outside, sat down, looked back, and realised they had never quite had one.</strong></p>
<p style="text-align: justify;"><img  title="The Job That Was Never There the-hollow-building " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-hollow-building.png"  alt="The Job That Was Never There the-hollow-building "  width="100%" /></p>
<p style="text-align: justify;">A few weeks ago I published<span> </span><strong><a href="https://blog.sqlauthority.com/2026/08/07/they-finished-the-ai-training-eleven-days-later-the-job-was-gone/" data-wpel-link="internal" rel="noopener noreferrer">an interview with somebody who finished their company&#8217;s AI development plan and was let go eleven days later</a></strong>.</p>
<p style="text-align: justify;">I expected messages about the training. Those came.</p>
<p style="text-align: justify;">The other kind I did not expect. There were more of them. They were worse. And every one of them circled the same thing without naming it, so I am going to name it here.</p>
<p style="text-align: justify;">Losing the building was not the painful part.</p>
<p style="text-align: justify;">That came about six weeks later, from a distance, when they finally looked back and saw what had actually been filling each day.</p>
<p style="text-align: justify;"><em><strong>The usual note, and this time it matters more.</strong><span> </span>Everything here is blended across many messages, reshaped so that no person, company, industry or system is identifiable. Titles, numbers and details are changed. And nobody in this piece is a fraud. I want that on the record before you read a word of it, not after.</em></p>
<h3 style="text-align: justify;">The Number</h3>
<p style="text-align: justify;"><img  title="The Job That Was Never There the-uncollected-pigeonholes " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-uncollected-pigeonholes.png"  alt="The Job That Was Never There the-uncollected-pigeonholes "  width="100%" /></p>
<p style="text-align: justify;">I will start with the one I cannot put down.</p>
<p style="text-align: justify;">Somebody wrote to me whose job, for six years, was a weekly number. It went out every Monday to a list of about forty people.</p>
<p style="text-align: justify;">It took most of Thursday and all of Friday morning, because the sources disagreed and reconciling them required knowing exactly where every body was buried.</p>
<p style="text-align: justify;">They knew.</p>
<p style="text-align: justify;">They were good at it. By every measure that existed inside that company, they were excellent at it.</p>
<p style="text-align: justify;">Two months after they were let go, they asked a former colleague to check something. They could not fully explain to me why.</p>
<p style="text-align: justify;">Nobody had asked for the number.</p>
<p style="text-align: justify;">Not once. Eight Mondays. Forty people on that list, and not one had noticed the email had stopped. Or they had noticed, and it had not been worth a message.</p>
<p style="text-align: justify;">They said they sat with the laptop open for a long time.</p>
<p style="text-align: justify;">They said the strange thing was that they were not angry. They were embarrassed, which they knew made no sense. And underneath the embarrassment was something worse.</p>
<p style="text-align: justify;">It was relief.</p>
<p style="text-align: justify;">They did not want to talk about the relief. I understand why. Relief means part of you already knew, and that part has been sitting quietly at the back of every Monday for six years, waiting to be proved right.</p>
<h3 style="text-align: justify;">Eleven Leads and One Thing Being Led</h3>
<p style="text-align: justify;"><img  title="The Job That Was Never There the-ring-of-rooms " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-ring-of-rooms.png"  alt="The Job That Was Never There the-ring-of-rooms "  width="100%" /></p>
<p style="text-align: justify;">Another message opened with a sentence I have thought about every day since.</p>
<p style="text-align: justify;"><em>I was the Regional Lead.</em></p>
<p style="text-align: justify;">They wrote it the way you write something you are proud of. They should have been. It took eleven years.</p>
<p style="text-align: justify;">Two paragraphs later, almost in passing, they listed the other people who sat in the same weekly meeting.</p>
<p style="text-align: justify;">The Global Lead. The Product Lead. The Platform Lead. The Security Lead. The Delivery Lead. The Data Lead. The Governance Lead. The Transformation Lead. The Value Realisation Lead. A Regional Lead for a different region. A Chief of Staff belonging to one of the above.</p>
<blockquote><p>Eleven job titles. One thing being led.</p></blockquote>
<p style="text-align: justify;">They wrote: &#8220;I counted them on the train home. Then I counted them again, because I assumed I had made a mistake.&#8221;</p>
<p style="text-align: justify;">Now here is the part that should worry you, and it is not the part you are expecting.</p>
<p style="text-align: justify;">Every one of those eleven was real. Every one worked hard. Every one of them could have explained to you, in detail, with evidence, exactly why their role existed and precisely how it differed from the other ten.</p>
<p style="text-align: justify;">And they would all have been right.</p>
<p style="text-align: justify;">Because each of those functions was invented on a Tuesday, by somebody sensible, solving a genuine problem that genuinely existed at the time.</p>
<p style="text-align: justify;">Nobody has ever been given the job of removing one.</p>
<p style="text-align: justify;">So they accumulate. A ring of invented functions forms around one real one, the way a pearl forms, slowly and without anybody&#8217;s permission, and after fifteen years nobody in the room can tell you which one was the grain of sand.</p>
<h3 style="text-align: justify;">Which Brings Me to the Uncomfortable Bit</h3>
<p style="text-align: justify;">I have gone back and forth on this and landed somewhere I did not expect.</p>
<blockquote><p>The people were innocent. The ecosystem was not.</p></blockquote>
<p style="text-align: justify;">You did not invent your title. You applied for it. Somebody described it to you across a table, and you believed them, because why on earth would you not.</p>
<p style="text-align: justify;">You did the work you were handed. You were measured against objectives you did not write, by a person who did not write them either, using a framework nobody in the building could name the origin of.</p>
<p style="text-align: justify;">You are not guilty of anything.</p>
<p style="text-align: justify;">But you were standing inside something that had stopped being honest with itself long before you arrived, and it needed you to keep standing there in order to keep going.</p>
<p style="text-align: justify;">That is not guilt. It is not innocence either.</p>
<p style="text-align: justify;">There is no word for it, and I think the absence of that word is a large part of why none of these people could say any of this out loud until a stranger wrote a blog post.</p>
<h3 style="text-align: justify;">The Tuesday You Already Knew</h3>
<p style="text-align: justify;">Here is something almost every one of them mentioned, and not one of them mentioned first.</p>
<p style="text-align: justify;">They already knew.</p>
<p style="text-align: justify;">Not fully. Not in a way you could act on. But there was a Tuesday, three or four or nine years ago, in the middle of something ordinary, when a thought arrived fully formed and completely unwelcome.</p>
<p style="text-align: justify;"><em>What am I actually doing.</em></p>
<p style="text-align: justify;">And you pushed it back down. Instantly. Expertly. The way you push down a thought about your own death, because you had a mortgage and a review coming up and two people at home who needed you to be fine.</p>
<p style="text-align: justify;">You did not lie to yourself.</p>
<p style="text-align: justify;">You simply declined to finish a sentence.</p>
<blockquote><p>You did not lie to yourself. You just chose, every day for years, not to finish one sentence.</p></blockquote>
<p style="text-align: justify;">I think almost everybody reading this has had that Tuesday. I suspect some of you had it recently.</p>
<p style="text-align: justify;">And I think you did exactly what they did, which is the only sane thing available at the time, which is nothing at all.</p>
<h3 style="text-align: justify;">Twenty Two Meetings and Four Sentences</h3>
<p style="text-align: justify;"><img  title="The Job That Was Never There twenty-two-chairs " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/twenty-two-chairs.png"  alt="The Job That Was Never There twenty-two-chairs "  width="100%" /></p>
<p style="text-align: justify;">Somebody who had been a Senior Manager for Operational Excellence, a real title held by real people in a great many companies, which I have never once heard defined twice the same way.</p>
<p style="text-align: justify;">In their final month, out of an instinct they could not name, they exported their own calendar.</p>
<p style="text-align: justify;">Twenty two recurring meetings. Governance forums. Alignment calls. Steering committees. Working groups.</p>
<p style="text-align: justify;">They went through them one at a time and asked the most dangerous question in corporate life.</p>
<p style="text-align: justify;"><em>In how many of these have I ever actually said anything?</em></p>
<p style="text-align: justify;">Four.</p>
<p style="text-align: justify;">In the other eighteen they were, in their own word, coverage. Their name on the invite meant the function was represented. The representation justified the function. The function justified the headcount. The headcount justified somebody more senior.</p>
<p style="text-align: justify;">Nobody designed that. I need you to hear that clearly.</p>
<p style="text-align: justify;">It accreted. Like coral. Beautiful, structural, and entirely made of things that used to be alive.</p>
<h3 style="text-align: justify;">The Deck That Became a Department</h3>
<p style="text-align: justify;"><img  title="The Job That Was Never There the-corridor-that-ends " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-corridor-that-ends.png"  alt="The Job That Was Never There the-corridor-that-ends "  width="100%" /></p>
<p style="text-align: justify;">Years ago, somebody noticed a real problem. A good observation, made by a person paying attention.</p>
<p style="text-align: justify;">They wrote it up with evidence. It was well received, because it was correct.</p>
<p style="text-align: justify;">They were asked to propose a solution. So they wrote a strategy document. Also well received.</p>
<p style="text-align: justify;">Then came headcount. Two people. Then five. Then a Head of. Then a function on the org chart with a mission statement, quarterly objectives, and a shared inbox.</p>
<p style="text-align: justify;">Somewhere in year three, the original problem was quietly solved by a platform migration that had nothing to do with any of them.</p>
<p style="text-align: justify;">The function ran for another four years.</p>
<blockquote><p>&#8220;I built a department out of being right once, and then spent four years protecting a thing whose reason had already gone. At the time it felt like leadership.&#8221;</p></blockquote>
<p style="text-align: justify;">It does not sound like failure to me. It sounds like almost every organisation I have ever walked into.</p>
<h3 style="text-align: justify;">Eleven Months of Green</h3>
<p style="text-align: justify;"><img  title="The Job That Was Never There the-green-facade " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-green-facade.png"  alt="The Job That Was Never There the-green-facade "  width="100%" /></p>
<p style="text-align: justify;">So many people wrote about status reporting that I could have stacked the messages.</p>
<p style="text-align: justify;">A programme reports green. Then green. Then green.</p>
<p style="text-align: justify;">Eleven consecutive months of green, on a dashboard seen by important people.</p>
<p style="text-align: justify;">In month twelve it is cancelled.</p>
<p style="text-align: justify;">Everybody knew by month three.</p>
<p style="text-align: justify;">What none of them could do was be the first to write amber. Amber is not a colour in those meetings. It is an accusation. It points at a specific person&#8217;s judgment, and the room hears it that way however carefully you word it.</p>
<p style="text-align: justify;">One of them told me about a colleague who did go amber. Early, honestly, with a plan attached.</p>
<p style="text-align: justify;">That colleague was not punished. That would have been easier to describe.</p>
<p style="text-align: justify;">They were offered support. There was a warm conversation about whether they were overloaded. Somebody senior was added to help them. Their scope reduced quietly over the following two quarters.</p>
<p style="text-align: justify;">Everybody watched. Everybody learned. Nobody ever discussed it.</p>
<blockquote><p>Green is not a measurement. Green is a social act.</p></blockquote>
<h3 style="text-align: justify;">The Boarding Pass</h3>
<p style="text-align: justify;">Somebody sent me a photograph of a boarding pass. It took me a moment to understand why, and then I found it almost unbearable.</p>
<p style="text-align: justify;">They had been flown to another country for a two day alignment workshop. Sixteen people. Four flown in. A facilitator. Breakout groups. Sticky notes, first physical, then carefully transcribed onto a digital board so the outputs would be preserved.</p>
<p style="text-align: justify;">They looked that board up recently.</p>
<p style="text-align: justify;">Still there. Read only. Last opened four days after the workshop.</p>
<p style="text-align: justify;">By them.</p>
<p style="text-align: justify;">They were careful to tell me it was not a waste, and I believe them. They met people they went on to work well with for years. Two decisions came out of it that stuck.</p>
<p style="text-align: justify;">Then they wrote this, and it is the line I keep returning to.</p>
<blockquote><p>&#8220;If somebody had told me to stay home and just send an email, I would have argued. I would have argued hard. That is the part I have to sit with.&#8221;</p></blockquote>
<h3 style="text-align: justify;">The Award</h3>
<p style="text-align: justify;">Somebody won an internal award. A real one. Ceremony, photograph, their manager visibly proud in a way they told me they still think about, years later.</p>
<p style="text-align: justify;">It was for delivering a migration ahead of schedule.</p>
<p style="text-align: justify;">They know now, with the terrible clarity that only arrives from outside the building, that they migrated a system almost nobody used onto a platform almost nobody would use. On time. Under budget. Beautifully.</p>
<p style="text-align: justify;">They still have it. They cannot throw it away and they cannot look at it.</p>
<p style="text-align: justify;">So it lives in a box, which seems to me like exactly the right place for most of what this piece is about.</p>
<h3 style="text-align: justify;">The One That Actually Hurts</h3>
<p style="text-align: justify;">Four separate people wrote to me about this, and every single one of them apologised for bringing it up.</p>
<p style="text-align: justify;">You onboarded somebody.</p>
<p style="text-align: justify;">A bright young person, three or four years ago. Genuinely talented. Delighted to be there. Nervous on the first morning in the way that is lovely to see.</p>
<p style="text-align: justify;">And you taught them.</p>
<p style="text-align: justify;">You explained which forum things get raised in. You showed them how to write a status update that is honest and survivable at the same time. You told them, kindly, patiently, with total sincerity, who has to be told before the meeting rather than during it.</p>
<p style="text-align: justify;">You were a good mentor.</p>
<p style="text-align: justify;">That is the terrible part. You were an excellent mentor. Several people have probably told you so.</p>
<blockquote><p>You handed a twenty six year old the complete operating manual for a machine you had not yet noticed was hollow.</p></blockquote>
<p style="text-align: justify;">One of them wrote: &#8220;They are still there. They are doing my old job now. They are very good at it.&#8221;</p>
<p style="text-align: justify;">I could not get that sentence out of my head for a week, and I am not sure I have managed it yet.</p>
<h3 style="text-align: justify;">What Is Actually Happening Here</h3>
<p style="text-align: justify;">The cheap version of this argument is that these people were passengers and the market simply corrected.</p>
<p style="text-align: justify;">That version is lazy, and it is cruel to people who worked extremely hard for a very long time.</p>
<p style="text-align: justify;">Here is what I think is really going on.</p>
<p style="text-align: justify;">Past a certain size, an organisation loses the ability to see value directly. It genuinely cannot tell, from the centre, whether the work at the edges produces anything.</p>
<p style="text-align: justify;">So it measures what it can see. Attendance. Reports. Status. Delivery against a plan it wrote itself.</p>
<p style="text-align: justify;">Activity.</p>
<p style="text-align: justify;">And people, being reasonable, supply activity. Not cynically. Not as a scheme. They supply it because it is what gets noticed, and being noticed is how you keep a job, and keeping a job is how you feed the people in your house.</p>
<p style="text-align: justify;">Every individual behaved rationally. The result was a building full of intelligent, sincere, hard working people producing artefacts for one another.</p>
<blockquote><p>Manufactured work is not fraud. It is what grows in the gap between what an organisation values and what it is able to measure.</p></blockquote>
<p style="text-align: justify;">That gap has been widening for twenty years. And now something has arrived that produces artefacts instantly, for free, in unlimited quantity.</p>
<p style="text-align: justify;">The gap is no longer possible to look away from.</p>
<h3 style="text-align: justify;">The Cruel Part Nobody Warns You About</h3>
<p style="text-align: justify;">Several of them worked this out alone, in different countries, at different times. Each thought it was a private discovery.</p>
<blockquote><p>The skills that kept you employed there do not exist anywhere else.</p></blockquote>
<p style="text-align: justify;">Knowing which forum to raise something in. Knowing who has to be told before the meeting rather than during it. Writing a status update that is honest and survivable at the same time. Knowing whose sign off is real and whose is decorative.</p>
<p style="text-align: justify;">Those are genuine skills. They are hard won. Several of the people who wrote to me were world class at them.</p>
<p style="text-align: justify;">None of it transfers. Not one item.</p>
<p style="text-align: justify;">It is all local knowledge about one building, and the building is gone.</p>
<p style="text-align: justify;">Which produces the specific cruelty in all of this. The people who were best at surviving that system are the ones it left with the least, and they cannot even name the problem in an interview, because the honest sentence is:</p>
<blockquote><p>&#8220;I was extremely good at something I can no longer describe.&#8221;</p></blockquote>
<h3 style="text-align: justify;">The Sentence You Lost</h3>
<p style="text-align: justify;">And here is a thing that never comes up in a redundancy conversation, because there is no box for it on the form.</p>
<p style="text-align: justify;">You did not only lose a job.</p>
<p style="text-align: justify;">You lost a sentence.</p>
<p style="text-align: justify;">Regional Lead was not a title. It was the sentence your parents used when their friends asked what you did. It was the answer you gave at your cousin&#8217;s wedding when somebody asked. It was on a lanyard that your child once wore around the house for an entire afternoon because they thought it was hilarious.</p>
<p style="text-align: justify;">That sentence is gone. There is nothing to put in its place yet.</p>
<p style="text-align: justify;">And you still have to attend things. People still ask.</p>
<blockquote><p>Nobody prepares you for how much of your identity was living inside a sentence you did not even write.</p></blockquote>
<h3 style="text-align: justify;">The Message That Was Not From Somebody Laid Off</h3>
<p style="text-align: justify;"><img  title="The Job That Was Never There one-lit-window " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/one-lit-window.png"  alt="The Job That Was Never There one-lit-window "  width="100%" /></p>
<p style="text-align: justify;">One of them still had their job.</p>
<p style="text-align: justify;">It arrived at eleven at night. It was four lines long.</p>
<p style="text-align: justify;">They had read the piece at their desk, twice, and then sat in their car in the car park for a while before driving home. They wanted me to know that. They asked me not to reply, which I have honoured until now.</p>
<p style="text-align: justify;">The last line was this.</p>
<blockquote><p>&#8220;I am not laid off. I am worse. I know.&#8221;</p></blockquote>
<p style="text-align: justify;">If that is you, reading this at your desk right now with the door open behind you, I do not have anything clever. I have only this. Knowing is the hard part and you have already done it. Everything after knowing is just decisions, and decisions are survivable.</p>
<h3 style="text-align: justify;">The Question I Have Started Asking</h3>
<p style="text-align: justify;">I am not going to hand you a framework. Every person in this piece is cleverer than a framework.</p>
<p style="text-align: justify;">But there is one question I now ask clients, and it is rude, and I ask it anyway.</p>
<p style="text-align: justify;"><em>If this person went on leave tomorrow and nobody backfilled them, what breaks, and how long before anybody outside this team notices?</em></p>
<p style="text-align: justify;">The point is not to be indispensable. Indispensable people are a risk, and usually an unhappy one.</p>
<p style="text-align: justify;">The point is that somebody should know the answer. In most places I visit, nobody has ever asked.</p>
<p style="text-align: justify;">And the version for you, on a Monday, is smaller and harder.</p>
<p style="text-align: justify;">Open last week&#8217;s calendar. Find the one thing you did that would still have been worth doing if the company had not existed.</p>
<p style="text-align: justify;">If you find it, protect it. That is the part that travels with you.</p>
<p style="text-align: justify;">If you cannot find one, you have not learned something shameful about yourself. You have learned something about the shape of the room you are standing in.</p>
<p style="text-align: justify;">And it is very much better to learn that on a Monday morning with a coffee than eight weeks after somebody takes your laptop.</p>
<h3 style="text-align: justify;">The Thing They All Did Without Noticing</h3>
<p style="text-align: justify;"><img  title="The Job That Was Never There the-second-cup " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-second-cup.png"  alt="The Job That Was Never There the-second-cup "  width="100%" /></p>
<p style="text-align: justify;">I want to end somewhere kinder, and I can, because there is something in these messages that surprised me and not one of them saw themselves doing it.</p>
<p style="text-align: justify;">Every single person, at some point in their email, stopped talking about the work.</p>
<p style="text-align: justify;">And started talking about a person.</p>
<p style="text-align: justify;">The colleague who quietly covered for them the fortnight their parent was ill. The one who always made two teas without being asked. The one who explained the same thing four times and never once let them feel stupid about it. The Friday messages.</p>
<p style="text-align: justify;">Not one of those was invented. Not one was manufactured. Nobody was ever inserted into a meeting to justify headcount and accidentally produced eleven years of friendship.</p>
<blockquote><p>The building was hollow. The people standing in it were not.</p></blockquote>
<p style="text-align: justify;">If you take one thing from all of this, take that one.</p>
<p style="text-align: justify;">The work may or may not have been real. That question is worth asking and you should ask it.</p>
<p style="text-align: justify;">But the person who noticed you were having a bad day and said nothing about it and simply put a coffee on your desk was completely real. They are still real. Nothing that happened to your company changed that.</p>
<p style="text-align: justify;">And you can message them tonight.</p>
<p style="text-align: justify;">This is the question underneath all thirty essays in my book<span> </span><strong>AI: Nobody&#8217;s in There. But we&#8217;re still in here.</strong><span> </span>All thirty are free to read at<span> </span><strong><a href="https://pinaldave.com/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">pinaldave.com</a></strong>, and the book is available in paperback, Kindle and audiobook on<span> </span><strong><a href="https://www.amazon.com/dp/B0H4T6W21S" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Amazon</a></strong>.</p>
<p style="text-align: justify;">One last message, and then I will stop.</p>
<p style="text-align: justify;">It came at the end of a very long email describing a career I would have been proud of, containing real achievements that I could see clearly and the writer could not see at all.</p>
<p style="text-align: justify;">The final line was this.</p>
<blockquote><p>&#8220;I keep telling people I lost my job. I do not think that is what happened. I think I found out.&#8221;</p></blockquote>
<p style="text-align: justify;"><strong>This is not a story about people who were not needed, it is a story about a building that could not tell the difference and quietly asked them to prove it every single day.</strong></p>
<p style="text-align: justify;"><strong>Reference: Pinal Dave</strong><span> </span>(<strong><a href="https://blog.sqlauthority.com/" data-wpel-link="internal" rel="noopener noreferrer">https://blog.sqlauthority.com/</a></strong>), Layoffs and Meaningful Work,<span> </span><strong><a href="https://x.com/pinaldave" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">X</a></strong></p>
<p style="text-align: justify;">
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/31/the-job-that-was-never-there/" data-wpel-link="internal" rel="noopener noreferrer">The Job That Was Never There</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/08/31/the-job-that-was-never-there/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">203287</post-id>	</item>
		<item>
		<title>I Let AI Recommend SQL Server Indexes Across a Week of Queries</title>
		<link>https://blog.sqlauthority.com/2026/08/28/i-let-ai-recommend-sql-server-indexes-across-a-week-of-queries/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=i-let-ai-recommend-sql-server-indexes-across-a-week-of-queries</link>
					<comments>https://blog.sqlauthority.com/2026/08/28/i-let-ai-recommend-sql-server-indexes-across-a-week-of-queries/#respond</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Fri, 28 Aug 2026 01:30:58 +0000</pubDate>
				<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[GenAI]]></category>
		<category><![CDATA[SQL Index]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=203372</guid>

					<description><![CDATA[<p>I let AI recommend SQL Server indexes across a week of queries, measured every number before and after, and the result was not the one I expected to write about.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/28/i-let-ai-recommend-sql-server-indexes-across-a-week-of-queries/" data-wpel-link="internal" rel="noopener noreferrer">I Let AI Recommend SQL Server Indexes Across a Week of Queries</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>I let AI recommend SQL Server indexes across a week of queries, measured every number before and after, and the result was not the one I expected to write about.</strong></p>
<p style="text-align: justify;"><img  title="I Let AI Recommend SQL Server Indexes Across a Week of Queries ai-indexes-hero " fetchpriority="high" decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/ai-indexes-hero.jpg"  alt="I Let AI Recommend SQL Server Indexes Across a Week of Queries ai-indexes-hero "  width="1920" height="1080" /><span></span></p>
<p style="text-align: justify;">I expected a comedy. I have read enough confident nonsense from chatbots about SQL Server to assume I would end up with a post full of terrible indexes and easy jokes.</p>
<p style="text-align: justify;">That is not what happened, and the actual answer is more useful.</p>
<p style="text-align: justify;"><strong>AI never connected to SQL Server or executed anything.</strong><span> </span>I gave a general-purpose chat model one query at a time, manually reviewed its suggestions, and applied the candidates in a disposable lab database. This is a case study of that copy-and-paste workflow, not a benchmark of every model and not autonomous index management.</p>
<h3 style="text-align: justify;">The Rules I Set Myself</h3>
<p style="text-align: justify;">One rule mattered more than the rest.<span> </span><strong>AI only saw what a typical copy-and-paste chat receives.</strong><span> </span>The table definitions and the query text. No execution plans, no statistics, no wait stats, no data distribution, and no list of the indexes that already existed.</p>
<p style="text-align: justify;">That is not me being unfair to it. That is the situation almost every person is in when they paste a slow query into a chat window and ask what index they need.</p>
<p style="text-align: justify;">Two honest notes about method. I structured the experiment as a Monday-to-Friday week of queries, but ran it in one sitting. I also started each query without telling the model what came before. Model answers can change over time, so treat this as one observed run, not a permanent score. Every reported result is measured rather than remembered.</p>
<h3 style="text-align: justify;">Monday. The Blank Slate</h3>
<p style="text-align: justify;">A small e-commerce shape. Nothing exotic.</p>
<table border="1">
<tbody>
<tr>
<th>Table</th>
<th>Rows</th>
</tr>
<tr>
<td>Customers</td>
<td>50,000</td>
</tr>
<tr>
<td>Products</td>
<td>2,000</td>
</tr>
<tr>
<td>Orders</td>
<td>300,000</td>
</tr>
<tr>
<td>OrderItems</td>
<td>900,000</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">Every table had a clustered primary key and nothing else. No nonclustered indexes anywhere. The data is generated deterministically. The script at the end reproduces the write-cost test rather than the whole six-query benchmark.</p>
<p style="text-align: justify;">Six queries, each run six times, whole set repeated three times, then averaged. Logical reads are stable to the page. Durations wander, so I never trusted a single run.</p>
<table border="1">
<tbody>
<tr>
<th>Query</th>
<th>Logical reads</th>
<th>Duration</th>
</tr>
<tr>
<td>Q1 orders for a customer</td>
<td>3,965</td>
<td>26.6 ms</td>
</tr>
<tr>
<td>Q2 pending orders</td>
<td>3,965</td>
<td>37.0 ms</td>
</tr>
<tr>
<td>Q3 items for a product</td>
<td>3,573</td>
<td>59.7 ms</td>
</tr>
<tr>
<td>Q4 customer by email</td>
<td>864</td>
<td>5.9 ms</td>
</tr>
<tr>
<td>Q5 top products</td>
<td>7,538</td>
<td>119.8 ms</td>
</tr>
<tr>
<td>Q6 country and status</td>
<td>3,965</td>
<td>41.1 ms</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>23,870</strong></td>
<td><strong>290.1 ms</strong></td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">With only clustered primary keys available, each query relied on at least one clustered index scan. SQL Server was reading far more pages than the selective queries needed.</p>
<h3 style="text-align: justify;">Tuesday. The Four Easy Ones</h3>
<p style="text-align: justify;">I handed over the first four queries, one at a time. Here is the first, and what came back.</p>
<pre>SELECT COUNT(*), SUM(TotalDue)
FROM dbo.Orders
WHERE CustomerID = 24680
  AND OrderDate &gt;= '2026-01-01' AND OrderDate &lt; '2026-08-01';

CREATE NONCLUSTERED INDEX IX_Orders_CustomerID_OrderDate
    ON dbo.Orders (CustomerID, OrderDate) INCLUDE (TotalDue);</pre>
<p style="text-align: justify;">For this isolated query on this data, that was a strong candidate. Equality column first, range column second, the aggregated column included so the query is covered. I would have tested the same shape.</p>
<p style="text-align: justify;">The next three were the same story.</p>
<pre>SELECT COUNT(*) FROM dbo.Orders
WHERE Status = 'Pending'
  AND OrderDate &gt;= '2026-07-01' AND OrderDate &lt; '2026-08-01';
-- IX_Orders_Status_OrderDate (Status, OrderDate)

SELECT COUNT(*), SUM(Quantity) FROM dbo.OrderItems
WHERE ProductID = 1234;
-- IX_OrderItems_ProductID (ProductID) INCLUDE (Quantity)

SELECT CustomerID, FullName FROM dbo.Customers
WHERE Email = 'user38217@example.com';
-- IX_Customers_Email (Email) INCLUDE (FullName)</pre>
<p style="text-align: justify;">Four queries, four sensible candidates, no drama.</p>
<table border="1">
<tbody>
<tr>
<th>Query</th>
<th>Reads before</th>
<th>Reads after</th>
<th>Duration after</th>
</tr>
<tr>
<td>Q1</td>
<td>3,965</td>
<td><strong>3</strong></td>
<td><strong>0.1 ms</strong></td>
</tr>
<tr>
<td>Q2</td>
<td>3,965</td>
<td><strong>13</strong></td>
<td><strong>0.2 ms</strong></td>
</tr>
<tr>
<td>Q3</td>
<td>3,573</td>
<td><strong>4</strong></td>
<td><strong>0.1 ms</strong></td>
</tr>
<tr>
<td>Q4</td>
<td>864</td>
<td><strong>3</strong></td>
<td><strong>0.0 ms</strong></td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">The duration values are averages rounded to one decimal place. Q4 showing 0.0 ms means the average was below 0.05 ms at that display precision, not that SQL Server did no work.</p>
<p style="text-align: justify;">Q1 went from 3,965 pages and 26.6 ms to three pages and 0.1 ms. If a junior DBA handed me that on Tuesday afternoon I would be pleased.</p>
<h3 style="text-align: justify;">Wednesday. The One It Only Half Solved</h3>
<p style="text-align: justify;">Then the query that actually looks like production.</p>
<pre>SELECT TOP (10) oi.ProductID, SUM(oi.Quantity * oi.UnitPrice)
FROM dbo.OrderItems oi
JOIN dbo.Orders o ON o.OrderID = oi.OrderID
WHERE o.OrderDate &gt;= '2026-06-01' AND o.OrderDate &lt; '2026-08-01'
GROUP BY oi.ProductID
ORDER BY SUM(oi.Quantity * oi.UnitPrice) DESC;</pre>
<p style="text-align: justify;">It asked for two indexes, one on each side of the join.</p>
<pre>CREATE NONCLUSTERED INDEX IX_Orders_OrderDate
    ON dbo.Orders (OrderDate);

CREATE NONCLUSTERED INDEX IX_OrderItems_OrderID
    ON dbo.OrderItems (OrderID) INCLUDE (ProductID, Quantity, UnitPrice);</pre>
<p style="text-align: justify;">The original reply redundantly listed<span> </span><code>OrderID</code><span> </span>as an included column in the first index. Because<span> </span><code>OrderID</code><span> </span>is the clustered key, SQL Server already carries it in every nonunique nonclustered index. I removed it before testing. Useful recommendation, small human correction.</p>
<p style="text-align: justify;">Reasonable on paper. Reads fell from 7,538 to 3,260 and the query went from 119.8 ms to 80.5 ms.</p>
<p style="text-align: justify;">That is the weakest result of the week, and it is the interesting one. When I checked usage afterwards, every other retained index registered seeks. The Q5 access path registered eighteen scans.</p>
<p style="text-align: justify;">Eighteen scans matched the eighteen controlled executions, but the usage counter was a clue, not a diagnosis. Query text cannot tell you which operator SQL Server actually chose. The actual execution plan can. It can also show that a scan is sometimes the cheapest correct choice, especially when SQL Server must aggregate many rows. A seek is not automatically good and a scan is not automatically bad.</p>
<p style="text-align: justify;">The sixth query was the last one, and it went the way Tuesday had.</p>
<pre>SELECT COUNT(*), SUM(TotalDue)
FROM dbo.Orders
WHERE ShipCountry = 'IN' AND Status = 'Shipped';

CREATE NONCLUSTERED INDEX IX_Orders_ShipCountry_Status
    ON dbo.Orders (ShipCountry, Status) INCLUDE (TotalDue);</pre>
<p style="text-align: justify;">Two equality predicates, both in the key, the aggregate included. Reads went from 3,965 to 163 and the query from 41.1 ms to 3.8 ms.</p>
<p style="text-align: justify;"><img  title="I Let AI Recommend SQL Server Indexes Across a Week of Queries fig-1-reads-collapse " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/fig-1-reads-collapse.png"  alt="I Let AI Recommend SQL Server Indexes Across a Week of Queries fig-1-reads-collapse "  width="1920" height="1080" /><span></span></p>
<p style="text-align: justify;"><em>All six queries, on a log scale because three pages and 7,538 pages will not share a linear axis. Five collapsed. One did not.</em></p>
<p style="text-align: justify;">That makes four indexes from Tuesday, two from Wednesday and one from Q6. Seven in total, and that is the set Thursday&#8217;s write test ran against.</p>
<h3 style="text-align: justify;">Thursday. Then I Looked at the Bill</h3>
<p style="text-align: justify;">Sixth query in, seven indexes down, everything faster. So I went looking for what I had not asked the chat model to price.</p>
<p style="text-align: justify;"><img  title="I Let AI Recommend SQL Server Indexes Across a Week of Queries fig-2-index-map " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/fig-2-index-map.png"  alt="I Let AI Recommend SQL Server Indexes Across a Week of Queries fig-2-index-map "  width="1920" height="1080" /><span></span></p>
<p style="text-align: justify;"><em>Where the seven landed. Six of them sit on the two tables the insert batch writes to, which is the whole of what follows.</em></p>
<p style="text-align: justify;">I inserted 20,000 orders and 60,000 order items as one batch, took the median of three runs, and deleted the rows in between. That restores the row count but not the exact physical state, so read this as a strong signal rather than a laboratory benchmark.</p>
<table border="1">
<tbody>
<tr>
<th>Combined insert batch</th>
<th>No nonclustered indexes</th>
<th>With seven retained indexes</th>
</tr>
<tr>
<td>20,000 orders and 60,000 order items</td>
<td><strong>592 ms</strong></td>
<td><strong>1,703 ms</strong></td>
</tr>
</tbody>
</table>
<p style="text-align: justify;"><strong>This insert batch took 2.9 times as long.</strong><span> </span>My benchmark notes also recorded the space occupied by the four lab tables and their indexes rising from 66 MB to 170 MB. I did not preserve the exact collection query, so that storage figure is context rather than a reproducible measurement.</p>
<p style="text-align: justify;">Not one of those costs appeared in any recommendation. Every answer was about the query in front of it, because the query and the schema were the only evidence I gave it. Ask a model about write cost and it will describe the categories correctly. It cannot price mine without seeing my workload.</p>
<h3 style="text-align: justify;">Friday. The One I Nearly Misread</h3>
<p style="text-align: justify;">A week means new queries arrive. So on Friday I did what everybody does. New slow query, paste it in, ask what index it needs.</p>
<pre>SELECT OrderID, Status FROM dbo.Orders WHERE CustomerID = 24680;
-- IX_Orders_CustomerID (CustomerID) INCLUDE (Status)</pre>
<p style="text-align: justify;">That is a sensible candidate, and it overlaps an index I already had.</p>
<table border="1">
<tbody>
<tr>
<th>Index</th>
<th>Key columns</th>
<th>Included columns</th>
<th>Size</th>
</tr>
<tr>
<td>IX_Orders_CustomerID</td>
<td>CustomerID</td>
<td>Status</td>
<td>7 MB</td>
</tr>
<tr>
<td>IX_Orders_CustomerID_OrderDate</td>
<td>CustomerID, OrderDate</td>
<td>TotalDue</td>
<td>16 MB</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">At first I called the new one redundant because<span> </span><code>CustomerID</code><span> </span>is the leftmost key of Tuesday&#8217;s index. That would have been a lovely ending and a wrong one. Friday&#8217;s query also returns<span> </span><code>Status</code>, and Tuesday&#8217;s index does not contain it.<span> </span><code>OrderID</code><span> </span>is available implicitly through the clustered key, but<span> </span><code>Status</code><span> </span>is not.</p>
<p style="text-align: justify;"><img  title="I Let AI Recommend SQL Server Indexes Across a Week of Queries fig-3-overlap-not-redundant " loading="lazy" decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/fig-3-overlap-not-redundant.png"  alt="I Let AI Recommend SQL Server Indexes Across a Week of Queries fig-3-overlap-not-redundant "  width="1920" height="1080" /><span></span></p>
<p style="text-align: justify;"><em>Both seek on CustomerID. Only one of them can return Status without going back to the table.</em></p>
<p style="text-align: justify;">The Tuesday index can seek to the customer and then look up<span> </span><code>Status</code>. The Friday candidate can cover the query. It is overlapping, not automatically redundant. A narrower covering index might help a frequent query, or it might add seven megabytes and write work for a benefit too small to matter. Only the actual plan, measured reads, query frequency, and write workload can settle that.</p>
<p style="text-align: justify;">This is still a context failure.<span> </span><strong>Nobody showed the model the index list or the workload.</strong><span> </span>It could propose a locally sensible index, but it could not compare that candidate with the rest of the portfolio. It answered the question it was asked, in a room with no windows. My first interpretation made the same mistake.</p>
<h3 style="text-align: justify;">The Week, In One Line</h3>
<p style="text-align: justify;">Across the first six queries and the seven retained indexes, the week took logical reads from<span> </span><strong>23,870 down to 3,446</strong>, and total duration from<span> </span><strong>290.1 ms down to 84.7 ms</strong>. The combined insert batch moved from 592 ms to 1,703 ms. My benchmark notes recorded the space figure moving from 66 MB to 170 MB, with the collection-method limitation described above. The Friday candidate is not included in those retained-index totals because this experiment did not establish that it deserved to remain.</p>
<p style="text-align: justify;"><img  title="I Let AI Recommend SQL Server Indexes Across a Week of Queries fig-4-gains-and-bill " loading="lazy" decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/fig-4-gains-and-bill.png"  alt="I Let AI Recommend SQL Server Indexes Across a Week of Queries fig-4-gains-and-bill "  width="1920" height="1080" /><span></span></p>
<p style="text-align: justify;"><em>The whole week on one axis. Everything on the left was asked for. Nothing on the right was.</em></p>
<h3 style="text-align: justify;">The Good, The Bad and The Ugly</h3>
<table border="1">
<tbody>
<tr>
<th></th>
<th>What happened</th>
<th>The number</th>
</tr>
<tr>
<td><strong>The Good</strong></td>
<td>The isolated index shapes were useful starting points, and all seven retained indexes registered activity in the controlled workload. That does not prove every one deserves to live forever.</td>
<td>Reads down<span> </span><strong>86%</strong><br />
Duration down<span> </span><strong>71%</strong></td>
</tr>
<tr>
<td><strong>The Bad</strong></td>
<td>The stateless recommendations did not price their own advice because I supplied no write workload, storage budget, or maintenance context.</td>
<td>Insert batch took<span> </span><strong>2.9x as long</strong><br />
Recorded space figure<span> </span><strong>2.6x as large</strong></td>
</tr>
<tr>
<td><strong>The Ugly</strong></td>
<td>Friday produced an overlapping candidate that could not be judged from the isolated query. My first attempt to call it redundant ignored its included column.</td>
<td><strong>7 MB</strong><span> </span>candidate<br />
Benefit not established</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">The ugly one is the part that gets worse over time. Each overlapping index can sound defensible by itself while the portfolio becomes harder to justify.</p>
<h3 style="text-align: justify;">Would I Do It Again</h3>
<p style="text-align: justify;">Yes, and I will. With three changes to how I ask.</p>
<p style="text-align: justify;"><strong>Paste the complete existing index definitions in with the query.</strong><span> </span>That means keys and included columns from<span> </span><em>sys.indexes</em>,<span> </span><em>sys.index_columns</em>, and<span> </span><em>sys.columns</em>, not merely the index names. This would have turned Friday into a portfolio discussion instead of another isolated recommendation.</p>
<p style="text-align: justify;"><strong>Ask what it might cost, then measure what it actually costs.</strong><span> </span>A model can list likely write, storage, and maintenance effects. It cannot price my workload without workload evidence.</p>
<p style="text-align: justify;"><strong>Give it the actual plan, not just the query.</strong><span> </span>Wednesday&#8217;s scan would have been visible immediately. That would not guarantee a better index, but it would stop anybody from treating a lower read count as the whole diagnosis.</p>
<p style="text-align: justify;">The pattern I keep landing on this year is always the same. Ask AI a narrow question and you can get a useful narrow answer. The danger is treating that answer as a system-wide decision. A database is a collection of tradeoffs, and a stateless chat sees only the evidence you paste into it.</p>
<blockquote><p>A stateless answer can be correct about one query and still know nothing about the workload surrounding it.</p></blockquote>
<p style="text-align: justify;">If you want the wider argument about where this technology genuinely helps and where it quietly does not, that is the subject of all thirty essays in my book<span> </span><em>AI: Nobody&#8217;s in There. But we&#8217;re still in here.</em><span> </span>Every essay is free to read in<span> </span><strong><a href="https://pinaldave.com/blog/index.html" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">the complete online collection</a></strong>, and there is a paperback on<span> </span><strong><a href="https://www.amazon.com/dp/B0H4T6W21S" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Amazon</a></strong><span> </span>if you would rather hold something real.</p>
<h3 style="text-align: justify;">Run the Smaller Write Test</h3>
<p style="text-align: justify;">This smaller lab demonstrates the write cost of one candidate index on the Orders table. It does not reproduce the 2.9x result above because it omits OrderItems and six of the seven retained indexes. Everything lives in temporary tables, so the test leaves nothing behind when the session ends.</p>
<p style="text-align: justify;">Build the 300,000-row temporary table first. Then run the timed block six times without the candidate index, discard the first run, and take the median of the other five.</p>
<pre>DROP TABLE IF EXISTS #Orders;
DROP TABLE IF EXISTS #Numbers;

CREATE TABLE #Orders (
    OrderID     int NOT NULL IDENTITY(1,1) PRIMARY KEY CLUSTERED,
    CustomerID  int NOT NULL,
    OrderDate   datetime2(0) NOT NULL,
    Status      varchar(12) NOT NULL,
    TotalDue    decimal(12,2) NOT NULL,
    ShipCountry char(2) NOT NULL,
    Filler      char(60) NOT NULL DEFAULT ''
);

WITH n(x) AS (SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL
              SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL
              SELECT 1 UNION ALL SELECT 1),
     t(x) AS (SELECT 1 FROM n a, n b, n c, n d, n e, n f)
SELECT TOP (300000) ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS rn
INTO #Numbers FROM t;

INSERT #Orders (CustomerID, OrderDate, Status, TotalDue, ShipCountry)
SELECT 1 + (rn * 7919) % 50000,
       DATEADD(minute, -((rn * 37) % 1051200), '2026-08-01T00:00:00'),
       CASE WHEN rn % 10 &lt; 7 THEN 'Shipped'
            WHEN rn % 10 &lt; 9 THEN 'Pending'
            ELSE 'Cancelled' END,
       CAST(10 + (rn % 90000) / 100.0 AS decimal(12,2)),
       CHOOSE(1 + rn % 6, 'US','GB','IN','DE','AU','CA')
FROM #Numbers;

DROP TABLE #Numbers;</pre>
<p style="text-align: justify;">Here is the timed block. The transaction restores the row count even if the test is repeated. The identity value still advances, which is harmless for this temporary lab table and is one more reason not to describe the database as physically identical afterwards.</p>
<pre>SET NOCOUNT ON;
SET XACT_ABORT ON;

BEGIN TRANSACTION;

DECLARE @t0 datetime2(7) = SYSDATETIME();

;WITH NewRows AS
(
    SELECT TOP (20000)
           ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS rn
    FROM sys.all_objects a
    CROSS JOIN sys.all_objects b
)
INSERT #Orders (CustomerID, OrderDate, Status, TotalDue, ShipCountry)
SELECT 1 + (rn * 7919) % 50000,
       '2026-08-01', 'Shipped', 99.00, 'IN'
FROM NewRows;

SELECT DATEDIFF(millisecond, @t0, SYSDATETIME()) AS InsertMs;

ROLLBACK TRANSACTION;</pre>
<p style="text-align: justify;">Now create the candidate index below and run the same timed block six more times. Again, discard the first run and take the median of the other five.</p>
<pre>CREATE NONCLUSTERED INDEX IX_Test_Orders_CustomerID_OrderDate
    ON #Orders (CustomerID, OrderDate) INCLUDE (TotalDue);</pre>
<p style="text-align: justify;">As a final sanity check, rebuild the temporary table and repeat the comparison in reverse order. Create the index, take the indexed measurements first, run<span> </span><code>DROP INDEX IX_Test_Orders_CustomerID_OrderDate ON #Orders;</code>, and then take the baseline measurements. This helps expose caching and run-order effects. The comparison answers one narrow question: how much write cost did this one index add to Orders? It does not validate the seven-index, two-table multiplier reported above.</p>
<p style="text-align: justify;">I have run a lot of index reviews over the years, and the ones that go wrong almost never go wrong because somebody chose a bad column. They go wrong because thirty good decisions were made one at a time, by people who could each only see one query.</p>
<p style="text-align: justify;">That is a very old problem. It has just found a very fast new way to happen.</p>
<p style="text-align: justify;"><strong>This is not a story about whether AI can suggest an index, it is a story about why a stateless recommendation cannot price a database-wide decision.</strong></p>
<p style="text-align: justify;"><strong>Reference: Pinal Dave (<a href="https://blog.sqlauthority.com/" data-wpel-link="internal" rel="noopener noreferrer">https://blog.sqlauthority.com/</a>), AI Indexes,<span> </span><a href="https://x.com/pinaldave" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">X</a></strong></p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/28/i-let-ai-recommend-sql-server-indexes-across-a-week-of-queries/" data-wpel-link="internal" rel="noopener noreferrer">I Let AI Recommend SQL Server Indexes Across a Week of Queries</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/08/28/i-let-ai-recommend-sql-server-indexes-across-a-week-of-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">203372</post-id>	</item>
		<item>
		<title>Who Is Going to Do My Job Now?</title>
		<link>https://blog.sqlauthority.com/2026/08/27/who-is-going-to-do-my-job-now/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=who-is-going-to-do-my-job-now</link>
					<comments>https://blog.sqlauthority.com/2026/08/27/who-is-going-to-do-my-job-now/#comments</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Thu, 27 Aug 2026 01:30:47 +0000</pubDate>
				<category><![CDATA[GenAI]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[SQL Jobs]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=203364</guid>

					<description><![CDATA[<p>Who is going to do my job now. That was the question in an email that arrived at 4:41 this morning, from a man who gave sixteen years to one company and handed his laptop back before lunch yesterday.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/27/who-is-going-to-do-my-job-now/" data-wpel-link="internal" rel="noopener noreferrer">Who Is Going to Do My Job Now?</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Who is going to do my job now. That was the question in an email that arrived at 4:41 this morning, from a man who gave sixteen years to one company and handed his laptop back before lunch yesterday.</strong></p>
<p style="text-align: justify;"><img  title="Who Is Going to Do My Job Now? two-shadows-one-child " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/two-shadows-one-child.jpg"  alt="Who Is Going to Do My Job Now? two-shadows-one-child "  width="100%" /></p>
<p style="text-align: justify;"><em>He said I could use this if it helped somebody. Names and details are changed so nobody is identifiable. The emails are trimmed for length and nothing else.</em></p>
<blockquote><p>&#8220;Pinal, I dont know why I am writing this to you. Yesterday they called me at 10:40 and the call was nine minutes. I gave the laptop back before lunch. 16 years.</p>
<p>I am not asking you for a job. I want to ask one thing and I cannot ask anyone here. Who is going to do my job now. There is the Thursday call. There is the vendor event next month and I have that whole thing in my head. Nobody asked me to hand anything over. Nobody asked. I keep waiting for someone to call and ask me how it works.</p>
<p>Sorry for the long mail. It is 4:41 here.&#8221;</p></blockquote>
<p style="text-align: justify;">He found me through the piece about<span> </span><strong><a href="https://blog.sqlauthority.com/2026/08/07/they-finished-the-ai-training-eleven-days-later-the-job-was-gone/" data-wpel-link="internal" rel="noopener noreferrer">the man who finished his company&#8217;s AI training and was let go eleven days later</a></strong>.<span> </span>This one is different. This one is waiting for an answer.</p>
<h3 style="text-align: justify;">What He Did With His Last Afternoon</h3>
<p style="text-align: justify;">Here is the part I cannot get past.</p>
<p style="text-align: justify;">They gave him until five to clear his desk.</p>
<p style="text-align: justify;">He did not clear his desk. He wrote a handover document.</p>
<p style="text-align: justify;"><img  title="Who Is Going to Do My Job Now? pages-lit-from-under " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/pages-lit-from-under.jpg"  alt="Who Is Going to Do My Job Now? pages-lit-from-under "  width="100%" /></p>
<p style="text-align: justify;">Fourteen pages. Which vendor calls you back and which one needs chasing on a Tuesday. Whose yes means yes and whose yes means ask again next week. Why the two systems disagree and which number to trust. The name of the woman at the hotel in October who holds the block booking.</p>
<p style="text-align: justify;">Sixteen years of knowing things, typed out by a man who had been let go four hours earlier, so that whoever came next would not have to struggle.</p>
<p style="text-align: justify;">He sent it to three people at 4:52.</p>
<p style="text-align: justify;">He checked from his phone that night, the way you check a message you should not still be thinking about.</p>
<p style="text-align: justify;">Nobody had opened it.</p>
<p style="text-align: justify;">Not out of cruelty. They were busy, it was late, and he was already gone.</p>
<p style="text-align: justify;">He wrote a goodbye note too. Something short, thanking people. The account had already been closed, so it came straight back to him.</p>
<p style="text-align: justify;"><em>Delivery has failed to these recipients.</em></p>
<p style="text-align: justify;">Sixteen years and the building would not even take the goodbye.</p>
<p style="text-align: justify;"><img  title="Who Is Going to Do My Job Now? the-bounce " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-bounce.jpg"  alt="Who Is Going to Do My Job Now? the-bounce "  width="100%" /></p>
<h3 style="text-align: justify;">His Week, Because You Will Recognize It</h3>
<p style="text-align: justify;">He described the job well, because he had described it a thousand times at family dinners.</p>
<p style="text-align: justify;"><strong>Monday.</strong><span> </span>The 9:00 status call. Forty minutes, eleven people, he speaks for three. Then he forwards the vendor thread with &#8220;Looping in Dan for visibility.&#8221; Dan does not reply. Dan never replies. Then the tracker, a spreadsheet with a tab called Master and a tab called Master FINAL.</p>
<p style="text-align: justify;"><strong>Tuesday.</strong><span> </span>The pre-meeting for Wednesday&#8217;s meeting. This is a real thing and everybody reading this knows it is a real thing. Then the deck. Fourteen slides. They will discuss slide four and run out of time.</p>
<p style="text-align: justify;"><strong>Wednesday.</strong><span> </span>The buyer is on the call. The seller is on the call. He is on the call. He makes two good points, and they genuinely are good, because he knows where the last three deals went sideways and nobody else does. Somebody says let us take this offline. He says he will set something up.</p>
<p style="text-align: justify;"><strong>Thursday.</strong><span> </span>The something he set up. Forty five minutes because thirty was not enough. Six action items with owners and dates, typed up that evening, subject line &#8220;Recap and next steps.&#8221;</p>
<p style="text-align: justify;"><strong>Friday.</strong><span> </span>Chasing the six action items. Four of them come back done. Two of them come back as questions, which means another Thursday.</p>
<p style="text-align: justify;">Some weeks he stayed late to get it right. Nobody asked him to. He did it because his name was on it.</p>
<p style="text-align: justify;">Nothing in that week is a lie. I want that said before the next part.</p>
<p style="text-align: justify;">And if you just read those five days and recognized your own, you are not the only one.</p>
<h3 style="text-align: justify;">So Who Does It Now</h3>
<p style="text-align: justify;">Nobody.</p>
<p style="text-align: justify;">Not a junior, not a tool, not a smaller team. Nobody, because none of it is waiting somewhere to be done.</p>
<p style="text-align: justify;">The buyer will still buy. The seller will still sell. The Thursday call will not get booked, and the thing it was going to unblock will get sorted in a two minute phone call between two people who were on the invite anyway.</p>
<p style="text-align: justify;">Somebody from marketing will stand at the booth. The hotel will release the block booking in September and no human being will be involved.</p>
<p style="text-align: justify;">He already knows this. That is why the message came at 4:41 and not at noon.</p>
<p style="text-align: justify;"><img  title="Who Is Going to Do My Job Now? chair-in-the-hallway " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/chair-in-the-hallway.jpg"  alt="Who Is Going to Do My Job Now? chair-in-the-hallway "  width="100%" /></p>
<h3 style="text-align: justify;">The Reminder That Kept Going Off</h3>
<p style="text-align: justify;">Years ago he put the Thursday call into his personal phone too, because he never wanted to be the reason a meeting slipped.</p>
<p style="text-align: justify;">They took the laptop. They took the account. Nobody thought about the phone.</p>
<p style="text-align: justify;">So at 1:45 it buzzed in his pocket while he stood in his own kitchen.</p>
<p style="text-align: justify;"><em>Recap and next steps. In 15 minutes.</em></p>
<p style="text-align: justify;"><img  title="Who Is Going to Do My Job Now? standing-at-145 " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/standing-at-145.jpg"  alt="Who Is Going to Do My Job Now? standing-at-145 "  width="100%" /></p>
<p style="text-align: justify;">He let it finish buzzing. He almost joined. He still knew the link by heart.</p>
<p style="text-align: justify;">Then he opened the calendar and looked at the rest of his year. The Thursdays. The quarterly reviews. The event in October.</p>
<p style="text-align: justify;">He deleted them one at a time. It took eleven minutes.</p>
<p style="text-align: justify;"><img  title="Who Is Going to Do My Job Now? the-eleven-minutes " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-eleven-minutes.jpg"  alt="Who Is Going to Do My Job Now? the-eleven-minutes "  width="100%" /></p>
<h3 style="text-align: justify;">The Mortgage Does Not Pause for Any of This</h3>
<p style="text-align: justify;">He mentioned the mortgage once, in a short sentence near the end, the way people mention the thing they are actually afraid of.</p>
<p style="text-align: justify;">So here is what I wrote back, because I do not think he is the only one awake at 4:41.</p>
<p style="text-align: justify;">Do the money math before the meaning math. Count the months you have tonight. A number is survivable. A fog is not.</p>
<p style="text-align: justify;">Then open that handover document and read it as a stranger would. Fourteen pages of judgment that took sixteen years to build. Inside nine thousand people it was invisible. In a company of forty it is a job with a title, nobody is doing it, and it is costing them money right now.</p>
<p style="text-align: justify;">Do not spend the first month building the case that you were needed. That is full time work that pays nothing.</p>
<p style="text-align: justify;">And send those fourteen pages to somebody who will open them. It is the best resume he will ever write, and he wrote it with his hands shaking.</p>
<h3 style="text-align: justify;">Then He Wrote Back</h3>
<p style="text-align: justify;">His second email came in the afternoon. Four lines.</p>
<blockquote><p>&#8220;One more thing and then I will leave you alone. My daughter asked me this morning why I was home. I told her I had the day off. She said good, can we get pancakes. So we got pancakes and she talked the whole time.</p>
<p>I will have to say something different on Monday. I dont know what yet.</p>
<p>Thank you for writing back. You are the first person who answered.&#8221;</p></blockquote>
<p style="text-align: justify;">Fourteen pages. Three recipients. Sixteen years of being the one who made sure nothing ever slipped.</p>
<p style="text-align: justify;">And a stranger on the internet was the first person who answered.</p>
<p style="text-align: justify;"><img  title="Who Is Going to Do My Job Now? the-answer " decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-answer.jpg"  alt="Who Is Going to Do My Job Now? the-answer "  width="100%" /></p>
<p style="text-align: justify;">That is the only part of this that is fixable, and it takes ninety seconds.</p>
<p style="text-align: justify;">Somebody you worked with got their nine minute call this month. Their goodbye note bounced too, which is why it never reached you, and you decided they probably wanted to be left alone.</p>
<p style="text-align: justify;">They did not. There is no right thing to say and there never was.</p>
<p style="text-align: justify;">Send the wrong thing. Be the first person who answered.</p>
<p style="text-align: justify;">This is the question underneath all thirty essays in my book<span> </span><strong>AI: Nobody&#8217;s in There. But we&#8217;re still in here.</strong><span> </span>They are free to read at<span> </span><strong><a href="https://pinaldave.com/blog/index.html" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">pinaldave.com</a></strong>, and the book is on<span> </span><strong><a href="https://www.amazon.com/dp/B0H4T6W21S" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Amazon</a></strong>.</p>
<p style="text-align: justify;">He is going to be fine. I believe that, and I told him so, and I am not saying it to make this end nicely.</p>
<p style="text-align: justify;">But somewhere tonight, fourteen pages are sitting unopened in three inboxes, written by a man with nowhere to be in the morning, so the next person would have it easier.</p>
<p style="text-align: justify;">There is no next person. He wrote it anyway.</p>
<p style="text-align: justify;"><strong>This is not a story about work that turned out not to matter, it is a story about a man who spent his last afternoon making sure somebody else would not struggle, and that is the part no company ever puts on the form.</strong></p>
<p style="text-align: justify;"><strong>Reference: Pinal Dave</strong><span> </span>(<strong><a href="https://blog.sqlauthority.com/" data-wpel-link="internal" rel="noopener noreferrer">https://blog.sqlauthority.com/</a></strong>), Layoffs and Meaningful Work,<span> </span><strong><a href="https://x.com/pinaldave" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">X</a></strong></p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/27/who-is-going-to-do-my-job-now/" data-wpel-link="internal" rel="noopener noreferrer">Who Is Going to Do My Job Now?</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/08/27/who-is-going-to-do-my-job-now/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">203364</post-id>	</item>
		<item>
		<title>Using Historical Data to Confirm Performance Improvements</title>
		<link>https://blog.sqlauthority.com/2026/08/26/using-historical-data-to-confirm-performance-improvements/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-historical-data-to-confirm-performance-improvements</link>
					<comments>https://blog.sqlauthority.com/2026/08/26/using-historical-data-to-confirm-performance-improvements/#respond</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Wed, 26 Aug 2026 01:30:53 +0000</pubDate>
				<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[Idera]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=203212</guid>

					<description><![CDATA[<p>Using historical data to confirm performance improvements turns a fast test into evidence the business can defend.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/26/using-historical-data-to-confirm-performance-improvements/" data-wpel-link="internal" rel="noopener noreferrer">Using Historical Data to Confirm Performance Improvements</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Using historical data to confirm performance improvements turns a fast test into evidence the business can defend.</strong></p>
<p style="text-align: justify;">Using historical data to confirm performance improvements starts with one fair question. Did the same work become cheaper under comparable conditions? In an illustrative case, a DBA deploys an index at 9:00 AM and watches average reads fall. The release channel fills with check marks.</p>
<p style="text-align: justify;">Before deployment, the query averaged 42,000 logical reads across 18,400 executions. Afterward, it averaged 6,100 reads across 11,200 executions. Total reads fell 91 percent, but executions fell 39 percent too.</p>
<p style="text-align: justify;">That missing context changes the decision. The team now needs matched windows, stable plans, and comparable parameters. Enough executions must pass before anyone calls the index a success.</p>
<h3 style="text-align: justify;">One Fast Execution Proves Almost Nothing</h3>
<p style="text-align: justify;">A clean test confirms a change for one parameter set. It cannot represent every customer, data distribution, or concurrency pattern. Cached pages and quiet servers can flatter results while hiding blocking, memory pressure, or storage latency.</p>
<p style="text-align: justify;">Start with per-execution duration, CPU, logical reads, writes, and waits. Then add execution count. If executions double after latency halves, aggregate duration stays level. Total CPU and reads still require separate calculations.</p>
<p style="text-align: justify;">Both views matter because users experience individual calls, while servers absorb the complete workload. Application growth may raise daily CPU despite better per-call latency. Modest per-call gains may also save substantial capacity on frequent statements. Report both perspectives instead of selecting the flattering number.</p>
<figure class="technical-flowchart" style="text-align: justify;"><a ref="magnificPopup" href="flowcharts/historical-performance-proof.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img  title="Using Historical Data to Confirm Performance Improvements historical-performance-proof-scaled " loading="lazy" decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/historical-performance-proof-scaled.png"  alt="Using Historical Data to Confirm Performance Improvements historical-performance-proof-scaled "  width="1000" height="3000" /></a></figure>
<h3 style="text-align: justify;">Use a Before-and-After Scorecard</h3>
<table border="1">
<thead>
<tr>
<th>Measure</th>
<th>What to Compare</th>
</tr>
</thead>
<tbody>
<tr>
<td>Duration</td>
<td>Typical behavior and slow outliers</td>
</tr>
<tr>
<td>CPU and reads</td>
<td>Per execution and total workload</td>
</tr>
<tr>
<td>Executions</td>
<td>Count, application, and parameter mix</td>
</tr>
<tr>
<td>Plan</td>
<td>Plan identity and estimate quality</td>
</tr>
<tr>
<td>Writes</td>
<td>DML latency, log volume, and maintenance</td>
</tr>
</tbody>
</table>
<h3 style="text-align: justify;">Build Comparable Workload Windows</h3>
<p style="text-align: justify;">Compare Monday morning with another normal Monday morning, not Sunday night. Match business cycles, batch schedules, release activity, and expected traffic. Keep important database, hardware, and configuration conditions consistent.</p>
<p style="text-align: justify;">The plan may change when a large customer replaces a small one. Match applications, databases, users, query signatures, and parameter patterns. Note any statistics update or plan change inside either window.</p>
<p style="text-align: justify;">Use several windows when the workload varies naturally. One favorable hour may be noise, while repeated improvements establish a pattern. Include enough executions to limit isolated outliers, and preserve the exact deployment time.</p>
<p style="text-align: justify;">Normalize totals when windows cover different durations, but never hide the raw values. Rates per minute help compare uneven windows, while counts preserve capacity impact. Separate scheduled jobs from interactive traffic when their patterns differ. Otherwise, one overnight process can make a healthy daytime change look unsuccessful.</p>
<h3 style="text-align: justify;">Read Product History With Context</h3>
<p style="text-align: justify;"><strong><a href="https://wiki.idera.com/spaces/SQLDM/pages/2381969479/View%2Bthe%2Bquery%2Bhistory" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">SQL DM from IDERA</a></strong><span> </span>charts query history for average duration, CPU, reads, writes, waits, blocking, deadlocks, and CPU per second. Event occurrences add execution-level statistics and SQL text. Now the graph answers the useful question: did the query stay faster during real traffic?</p>
<p style="text-align: justify;">That history still reflects collection settings. Filters, thresholds, disabled monitoring, and retention choices can create gaps. Older query records may be aggregated into daily summaries, which suppresses some statement, client, and user detail. Repository grooming can also remove data beyond the configured retention period.</p>
<h3 style="text-align: justify;">Use Query Store as a Second Witness</h3>
<p style="text-align: justify;">Query Store persists query text, plans, and runtime statistics. SQL Server 2017 and later can capture query-level waits. This historical evidence can connect an improvement with an index, plan, or workload change.</p>
<p style="text-align: justify;">Query Store is not a recording of every execution. Runtime statistics are aggregated into configurable time intervals. Its averages, minimums, maximums, and standard deviations describe each plan within those intervals. Capture policies, cleanup settings, and storage limits determine what remains available.</p>
<p style="text-align: justify;">Compare plan identifiers as well as query identifiers, because lower duration may come from an unrelated new plan. A forced plan or statistics refresh may alter the result. The claim gets stronger when the plan, change, and result share one clear timeline.</p>
<h3 style="text-align: justify;">Measure the Cost of the Improvement</h3>
<p style="text-align: justify;">An index can reduce reads for selected queries while increasing work for data changes. Check insert, update, and delete activity on the affected table. Review index size, maintenance time, logging, lock behavior, and storage consumption. Confirm that neighboring queries did not regress.</p>
<p style="text-align: justify;">Native index usage counters can reveal seeks, scans, lookups, and update maintenance. However, those counters reset after events such as a server restart. Record the observation start time, because a short window may miss monthly reports depending on the index.</p>
<p style="text-align: justify;">Define success and guardrails before deployment, such as lower reads without raising write latency beyond an agreed threshold. Capture the same metrics after deployment for an equivalent business window. Keep a rollback script available until the evidence remains stable.</p>
<h3 style="text-align: justify;">The Fair Counterargument</h3>
<p style="text-align: justify;">Controlled benchmarks can demonstrate causality better than messy production history. A test regression costs nothing, while a production regression costs customers. That argument holds when test data and execution conditions represent production. Laboratory testing makes repeated measurements safer, especially when schema changes carry real risk.</p>
<p style="text-align: justify;">However, controlled tests remove the concurrency, parameter diversity, and operational surprises that often determine production performance. Historical monitoring supplies that missing context. The strongest conclusion combines controlled testing with comparable production windows. Neither source should carry the decision alone.</p>
<h3 style="text-align: justify;">A Result Worth Keeping</h3>
<p style="text-align: justify;">Baselines provide a comparison.<span> </span><strong><a href="https://wiki.idera.com/spaces/SQLDM/pages/2381969457/Configure%2Bserver%2Bbaseline%2Boptions" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">SQL DM from IDERA</a></strong><span> </span>supports a moving seven-day dynamic baseline and fixed custom periods. Choose normal periods and exclude quiet hours that distort expected behavior. A baseline is a reference, not an automatic verdict.</p>
<p style="text-align: justify;">A trustworthy report shows the gain and every reason it might be misleading. Name the change, workload window, execution count, plans, and resource effect. Document competing deployments, missing data, and the period of stable behavior.</p>
<p style="text-align: justify;">The DBA from 9:00 AM should wait through the next comparable peak. If reads stay lower and the guardrails hold, the change has earned its place. Then write the result down, because next quarter nobody will remember the details.</p>
<p style="text-align: justify;"><strong>A fast test opens the case. A faster workload earns the decision.</strong></p>
<p style="text-align: justify;">Reference: <strong>Pinal Dave (<a href="https://blog.sqlauthority.com/" data-wpel-link="internal" rel="noopener noreferrer">https://blog.sqlauthority.com/</a>), <a href="https://x.com/pinaldave" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">X</a></strong></p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/26/using-historical-data-to-confirm-performance-improvements/" data-wpel-link="internal" rel="noopener noreferrer">Using Historical Data to Confirm Performance Improvements</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/08/26/using-historical-data-to-confirm-performance-improvements/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">203212</post-id>	</item>
		<item>
		<title>Full, Differential and Log Backups: A Practical Guide</title>
		<link>https://blog.sqlauthority.com/2026/08/25/full-differential-and-log-backups-a-practical-guide/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=full-differential-and-log-backups-a-practical-guide</link>
					<comments>https://blog.sqlauthority.com/2026/08/25/full-differential-and-log-backups-a-practical-guide/#respond</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Tue, 25 Aug 2026 01:30:02 +0000</pubDate>
				<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Backup]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Log]]></category>
		<category><![CDATA[Transaction Log]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=203344</guid>

					<description><![CDATA[<p>Full, differential and log backups are the three things almost every SQL Server DBA can define, and the three things a surprising number of us get wrong under pressure at two in the morning.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/25/full-differential-and-log-backups-a-practical-guide/" data-wpel-link="internal" rel="noopener noreferrer">Full, Differential and Log Backups: A Practical Guide</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Full, differential and log backups are the three things almost every SQL Server DBA can define, and the three things a surprising number of us get wrong under pressure at two in the morning.</strong></p>
<p style="text-align: justify;">I&#8217;ve been answering the same question for twenty years. Somebody has a full backup, a pile of differentials, and a few hundred log backups, and they want to know which ones go back in and in what order.</p>
<p style="text-align: justify;">I wrote it up in July 2009 with a static diagram. That post still gets traffic every single week, which tells you the question never went away.</p>
<p style="text-align: justify;">So this time I&#8217;ve animated it, and I&#8217;ve split it in two. Full and log backups first, then differentials once the first part makes sense.</p>
<p style="text-align: justify;">Everything here assumes the FULL recovery model. SQL Server does not allow transaction log backups in SIMPLE. Just switched a database from SIMPLE to FULL? Take a full or differential data backup first. That data backup is what starts the log chain.</p>
<p style="text-align: justify;"><img  title="Full, Differential and Log Backups: A Practical Guide the-night-of-258-log-files " loading="lazy" decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/the-night-of-258-log-files.jpg"  alt="Full, Differential and Log Backups: A Practical Guide the-night-of-258-log-files "  width="1600" height="1807" /></p>
<h3 style="text-align: justify;">Start With Just Full and Log</h3>
<p style="text-align: justify;"><img  title="Full, Differential and Log Backups: A Practical Guide backup-chain " loading="lazy" decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/backup-chain.gif"  alt="Full, Differential and Log Backups: A Practical Guide backup-chain "  width="1280" height="880" /></p>
<p style="text-align: justify;">Give it a minute to run all the way through. It loops.</p>
<h3 style="text-align: justify;">Full and Log Backups, In Plain Words</h3>
<p style="text-align: justify;"><strong>A full backup gives the restore its starting image of the database.</strong><span> </span>It copies the whole thing. Differentials measure their changes from a full backup, and log backups carry on their own chain straight across any later full backups.</p>
<p style="text-align: justify;"><strong>A log backup contains the log records that the previous log backup did not capture.</strong><span> </span>These are links in a chain. Each one hands over to the next. If one goes missing, your restore stops dead at that point and nothing after it can be applied.</p>
<h3 style="text-align: justify;">The Restore Order Without a Differential</h3>
<p style="text-align: justify;">Restore the full backup, then apply every log backup taken after it, in order, with none skipped. That is the whole sequence.</p>
<p style="text-align: justify;">Every statement except the last carries NORECOVERY. That&#8217;s the flag telling SQL Server you have more files coming. The final statement carries RECOVERY, and that&#8217;s the one that opens the database for use.</p>
<p style="text-align: justify;">Run RECOVERY too early and there&#8217;s no undo. The database comes online and you start the sequence again from a data backup. I explained that flag properly in a<span> </span><strong><a href="https://blog.sqlauthority.com/2009/07/15/sql-server-restore-sequence-and-understanding-norecovery-and-recovery/" data-wpel-link="internal" rel="noopener noreferrer">companion post the following day in 2009</a></strong>, and the behavior hasn&#8217;t changed since.</p>
<h3 style="text-align: justify;">Now Add the Differential</h3>
<p style="text-align: justify;">Here&#8217;s the part that makes the whole thing click, and it&#8217;s the reason for the second animation.</p>
<p style="text-align: justify;"><img  title="Full, Differential and Log Backups: A Practical Guide backup-why-differential " loading="lazy" decoding="async" src="https://blog.sqlauthority.com/wp-content/uploads/2026/08/backup-why-differential.gif"  alt="Full, Differential and Log Backups: A Practical Guide backup-why-differential "  width="1280" height="880" /></p>
<p style="text-align: justify;"><strong>A differential holds everything that changed since the last full.</strong><span> </span>Not since the last differential. Since the last full. That is the single most misunderstood sentence in SQL Server backups. It is also why differentials generally grow as their base gets older, though the size is not guaranteed to rise every single day.</p>
<p style="text-align: justify;">The word people reach for is incremental, and that&#8217;s the wrong word. Incremental would mean each one picks up where the previous one stopped. Differentials are cumulative. Each one starts again from the full.</p>
<p style="text-align: justify;">So the sequence gains one step. Restore the full backup you chose. Then restore the newest usable differential<span> </span><strong>that is based on that full</strong>. Then apply every log backup taken after it, in order.</p>
<p style="text-align: justify;">That middle sentence matters more than it looks. A differential only applies to the specific full backup it was based on, so &#8220;just grab the newest differential&#8221; is the wrong instinct if you have restored an older full.</p>
<p style="text-align: justify;">Once a newer usable differential exists, you normally skip the earlier ones. Keep them until the new file has been verified, though. An older differential on the same full is a perfectly good fallback if the newest one turns out to be corrupt.</p>
<h3 style="text-align: justify;">What the Differential Actually Buys You</h3>
<p style="text-align: justify;">The numbers in that animation are worth spelling out, because they&#8217;re the entire argument.</p>
<p style="text-align: justify;">Take a full backup at Sunday 22:00, log backups every fifteen minutes, and a disaster on Wednesday at 14:35. The last usable log is 14:30.</p>
<p style="text-align: justify;">Sunday 22:00 to Wednesday 14:30 is 64.5 hours. At four log backups an hour that&#8217;s<span> </span><strong>258 log backups</strong>. Add the full and you&#8217;re restoring 259 files, every one of them in the correct order, every one of them needing to work.</p>
<p style="text-align: justify;">Now add a single differential at Wednesday noon. You restore the full, then that differential, then the logs from 12:15 to 14:30. Ten of them.<span> </span><strong>Twelve files instead of 259.</strong></p>
<p style="text-align: justify;">Same data. Same second in time. Twelve files to get right while your phone is ringing, instead of two hundred and fifty nine.</p>
<p style="text-align: justify;">In this FULL recovery example, that is what a differential buys you. It replaces hundreds of log restores with one data backup and the handful of logs that follow it.</p>
<p style="text-align: justify;">One thing I have skipped on purpose. This example stops at the 14:30 log backup. In a real failure, if the tail of the log is still readable and you want the latest possible moment, take a tail-log backup before you start restoring, and that becomes the final log in the sequence.</p>
<h3 style="text-align: justify;">The Strategy Most People Actually Have</h3>
<p style="text-align: justify;">Here is what I find on real servers more often than anything else. A full backup every night, log backups every so often, and no differentials at all.</p>
<p style="text-align: justify;">It works. That is the problem. It works right up until the day you need it, and then somebody discovers that recovering to lunchtime means feeding two hundred and fifty eight files through in order while the business waits.</p>
<p style="text-align: justify;">The other version I see is worse. Full backups only, no log backups, and the database sitting in FULL recovery. That setup quietly grows the transaction log until a disk fills up at three in the morning.</p>
<p style="text-align: justify;">Differentials fix the first problem. Log backups fix the second. Most shops need both.</p>
<h3 style="text-align: justify;">A Starting Point, Not a Prescription</h3>
<p style="text-align: justify;">If you have nothing today, start here and adjust.</p>
<table border="1">
<tbody>
<tr>
<th>Backup</th>
<th>How often</th>
<th>What actually decides it</th>
</tr>
<tr>
<td><strong>Full</strong></td>
<td>Weekly, on your quietest night</td>
<td>Database size and how long a full backup takes</td>
</tr>
<tr>
<td><strong>Differential</strong></td>
<td>Nightly</td>
<td>How long you can let a restore run</td>
</tr>
<tr>
<td><strong>Log</strong></td>
<td>Every 15 minutes</td>
<td>How much data you can afford to lose</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">That last row is the one worth sitting with.<span> </span><strong>Your log backup interval is your data loss window.</strong><span> </span>Back up every fifteen minutes and you can lose fifteen minutes. Back up hourly and you can lose an hour. Nobody sets that number for you. The business does, whether they realize it or not.</p>
<p style="text-align: justify;">Now the disclaimer, and I mean it. These are starting numbers, not answers. A busy database might need log backups every five minutes. A quiet reporting database might be fine with a nightly full and nothing else. Big databases sometimes cannot finish a weekly full inside the window at all.</p>
<p style="text-align: justify;">Try a schedule, measure it, and change it. What works on my servers may be wrong on yours.</p>
<h3 style="text-align: justify;">Five Questions I Get Very Frequently</h3>
<p style="text-align: justify;"><strong>Why does my log file keep growing and never shrink?</strong></p>
<p style="text-align: justify;">Almost always the same answer. The database is in FULL recovery and nobody is taking log backups. SQL Server holds on to every log record until a log backup releases it, so the file grows forever.</p>
<p style="text-align: justify;">Take log backups, or switch to SIMPLE if you genuinely do not need point in time recovery. Shrinking the file without fixing the cause just means you get to do it again next month. I wrote this up properly in<span> </span><strong><a href="https://blog.sqlauthority.com/2010/09/20/sql-server-how-to-stop-growing-log-file-too-big/" data-wpel-link="internal" rel="noopener noreferrer">How to Stop Growing Log File Too Big</a></strong>, and more recently in<span> </span><strong><a href="https://blog.sqlauthority.com/2023/08/21/sql-server-transaction-logs-the-good-the-bad-and-the-ugly/" data-wpel-link="internal" rel="noopener noreferrer">Transaction Logs: The Good, The Bad, and The Ugly</a></strong>.</p>
<p style="text-align: justify;"><strong>I take a full backup every night. Do I still need log backups?</strong></p>
<p style="text-align: justify;">If the database is in FULL recovery, yes. A full backup does not release the log. That surprises people constantly. You can back up nightly for a year and still run out of disk.</p>
<p style="text-align: justify;"><strong>How often should I take a differential?</strong></p>
<p style="text-align: justify;">Ask how long you are willing to sit and watch a restore. Nightly differentials mean you never replay more than a day of logs. Every six hours means you never replay more than six. It costs you a little storage and buys you a much shorter bad afternoon.</p>
<p style="text-align: justify;"><strong>Can I skip all this and just use SIMPLE recovery?</strong></p>
<p style="text-align: justify;">You can, and for some databases it is the right call. In SIMPLE there are no log backups, so you recover to your last full or differential and lose everything after it. If that is acceptable for a reporting copy, use it. If it is a system your business runs on, it is not. There is more on choosing in<span> </span><strong><a href="https://blog.sqlauthority.com/2007/06/13/sql-server-recovery-models-and-selection/" data-wpel-link="internal" rel="noopener noreferrer">Recovery Models and Selection</a></strong>.</p>
<p style="text-align: justify;"><strong>How do I know any of this actually works?</strong></p>
<p style="text-align: justify;">You restore it. There is no other way to know, and there never has been.</p>
<p style="text-align: justify;">Put a restore test in the calendar the way you put a backup job in the scheduler. Once a month, pick a real backup set, restore it somewhere harmless, and run a query against it. That is the whole test.</p>
<p style="text-align: justify;">A backup is not a backup until it has been restored. Until then it is a file you are hoping about.</p>
<h3 style="text-align: justify;">Three Things That Cost People Their Afternoon</h3>
<p style="text-align: justify;"><strong>Restoring every differential.</strong><span> </span>You only need the newest one that matches your full. I&#8217;ve watched people restore four in a row, waiting through each, before somebody points out that the last one already contained the other three.</p>
<p style="text-align: justify;"><strong>Assuming a full backup breaks the log chain.</strong><span> </span>It doesn&#8217;t. This one surprises people every time. You can take a full backup in the middle of the day and your log backups carry on chaining exactly as before. What actually breaks the chain is switching the database to the SIMPLE recovery model, and switching back does not repair it. You need a full or differential data backup to start the new chain.</p>
<p style="text-align: justify;"><strong>Forgetting that a COPY_ONLY full does not reset the differential base.</strong><span> </span>That&#8217;s the whole point of it. Take a copy for a developer with COPY_ONLY and tonight&#8217;s differential still measures from your real Sunday full. Take a normal full instead and it quietly becomes the new differential base, so every differential after it depends on a file you never meant to keep.</p>
<h3 style="text-align: justify;">The Old Post, Seventeen Years On</h3>
<p style="text-align: justify;">If you want the original written version with the static diagram, it&#8217;s still here:<span> </span><strong><a href="https://blog.sqlauthority.com/2009/07/14/sql-server-backup-timeline-and-understanding-of-database-restore-process-in-full-recovery-model/" data-wpel-link="internal" rel="noopener noreferrer">Backup Timeline and Understanding of Database Restore Process in Full Recovery Model</a></strong>, from 14 July 2009.</p>
<p style="text-align: justify;">Reading it back, I wouldn&#8217;t change the explanation. I&#8217;d just draw it better, which is what I&#8217;ve finally done.</p>
<p style="text-align: justify;">The thing I&#8217;d add is the practice. Knowing this order and having run it are not the same skill, and the gap between them only shows up on the worst day of your year.</p>
<p style="text-align: justify;">Your backups are not a backup strategy. They&#8217;re a restore strategy that hasn&#8217;t been tested yet.</p>
<p style="text-align: justify;"><strong>This is not a story about which backup types exist, it is a story about the ten minutes on a bad afternoon when you have to remember what order they go back in.</strong></p>
<p style="text-align: justify;"><strong>Reference: Pinal Dave (<a href="https://blog.sqlauthority.com/" data-wpel-link="internal" rel="noopener noreferrer">https://blog.sqlauthority.com/</a>), Differential Backup,<span> </span><a href="https://x.com/pinaldave" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">X</a></strong></p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/08/25/full-differential-and-log-backups-a-practical-guide/" data-wpel-link="internal" rel="noopener noreferrer">Full, Differential and Log Backups: A Practical Guide</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/08/25/full-differential-and-log-backups-a-practical-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">203344</post-id>	</item>
	</channel>
</rss>
