<?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>Wed, 07 Oct 2026 01:30:00 +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>AI Sounds Like Someone, But Nobody Is in There</title>
		<link>https://blog.sqlauthority.com/2026/10/10/ai-sounds-like-someone/</link>
					<comments>https://blog.sqlauthority.com/2026/10/10/ai-sounds-like-someone/#respond</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Sat, 10 Oct 2026 01:30:00 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Book]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[SQL Humor]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=215057</guid>

					<description><![CDATA[<p>AI sounds like someone, which is exactly why the checking stops. Cardinal read the cover of my book and has not recovered.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/10/ai-sounds-like-someone/">AI Sounds Like Someone, But Nobody Is in There</a></p>
]]></description>
										<content:encoded><![CDATA[<p><strong>AI sounds like someone, which is exactly why the checking stops. Cardinal read the cover of my book and has not recovered.</strong></p>
<p><picture><source media="(max-width: 600px)" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/03-ai-sounds-like-someone-titled-tall.webp"><img fetchpriority="high" decoding="async" class="wp-image-215367" width="1500" height="558" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/03-ai-sounds-like-someone-titled.webp" alt="Three panel cartoon. The red bird asks what Sam is reading. Sam holds up a book cover and the bird goes quiet. The bird protests that it is right here, and Sam says that is the part the book is about." style="max-width:100%;height:auto;" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/03-ai-sounds-like-someone-titled.webp 1500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/03-ai-sounds-like-someone-titled-500x186.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/03-ai-sounds-like-someone-titled-800x298.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/03-ai-sounds-like-someone-titled-600x223.webp 600w" sizes="(max-width: 1500px) 100vw, 1500px" /></picture></p>
<p><em>Cardinal Rules. A Saturday cartoon about AI and databases.</em></p>
<p>My book is called <strong>AI: Nobody&#8217;s in There. But we&#8217;re still in here.</strong> Cardinal considers the title a personal attack.</p>
<p>We are built to hear a person behind words, and it takes almost nothing to set that off. A thermostat that says I am cold gets sympathy. A chat window that opens with great question, let me think about that, gets trust it has not earned yet.</p>
<p>In database work the cost is specific. A new analyst joins on Monday and you read their first report line by line. Not because they seem careless, but because you have no history with them. Cardinal has no history with you either. Cardinal simply talks like a colleague of six years, so the reading line by line quietly stops.</p>
<p>Politeness is a setting. Warmth is a setting. Neither one connects to whether the number is right. The same model that writes a graceful apology for the last wrong answer will deliver the next one in exactly the same tone.</p>
<p>So here is the habit worth keeping. When an answer feels reassuring, treat that as the cue to open a second window and run the count yourself. The feeling of being helped and the fact of being right are different things, and only one of them survives the board meeting.</p>
<h2>Cardinal Rule</h2>
<blockquote>
<p><strong>Something that talks like a person is still a something.</strong></p>
</blockquote>
<p>The tone is a setting. The number is a fact. Check the one that matters.</p>
<p><em>Cardinal admits the subtitle helps, but only slightly. On the desk this season: <strong>AI: Nobody&#8217;s in There. But we&#8217;re still in here.</strong> (<a target="_blank" rel="nofollow noopener" href="https://www.amazon.com/dp/B0H4T6W21S">on Amazon</a>) and <a href="https://blog.sqlauthority.com/2026/09/24/ai-interview-questions-book/">100 AI Interview Questions and Answers for Data Professionals</a> (<a target="_blank" rel="nofollow noopener" href="https://www.amazon.com/dp/B0HKK9VQ8Z">Kindle</a>, also on <a target="_blank" rel="nofollow noopener" href="https://www.amazon.in/dp/B0HKK9VQ8Z">Amazon.in</a>, <a target="_blank" rel="nofollow noopener" href="https://www.amazon.com/dp/B0HKN42ZDG">paperback</a> and <a target="_blank" rel="nofollow noopener" href="https://www.amazon.com/dp/B0HKL1PK8Q">audiobook</a>).</em></p>
<p>Next Saturday, the VP asks whether Cardinal can run straight into production.</p>
<p><strong>The warmth in an answer is not evidence, it is packaging.</strong></p>
<p>Published by <strong>Pinal Dave</strong> on <a href="https://blog.sqlauthority.com/">SQLAuthority</a>. More of my work at <a href="https://pinaldave.com/" target="_blank" rel="noopener">pinaldave.com</a>.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/10/ai-sounds-like-someone/">AI Sounds Like Someone, But Nobody Is in There</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/10/10/ai-sounds-like-someone/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">215057</post-id>	</item>
		<item>
		<title>Text to SQL: The SQL Was Never the Hard Part</title>
		<link>https://blog.sqlauthority.com/2026/10/09/text-to-sql/</link>
					<comments>https://blog.sqlauthority.com/2026/10/09/text-to-sql/#respond</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Fri, 09 Oct 2026 01:30:00 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Developer]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=214318</guid>

					<description><![CDATA[<p>Text to SQL works now, on real schemas, with joins and window functions. I watched three companies hand it to their business users, and all three quietly stopped. The SQL was never the hard part. The hard part is knowing which table is real and which meaning of the word you meant.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/09/text-to-sql/">Text to SQL: The SQL Was Never the Hard Part</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Text to SQL works now. It works, on real schemas, with joins and date logic and window functions. I&#8217;ve watched three companies hand it to their business users. All three quietly stopped using it within a few months.</strong></p>
<p style="text-align: justify;"><img decoding="async" class="wp-image-214314" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-which-one-is-real.webp" alt="Painting of five identical filing cabinets floating in dark space. Four are cold and sealed, one glows from a half-open drawer, and a brass plaque in front reads WHICH ONE IS REAL." width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-which-one-is-real.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-which-one-is-real-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-which-one-is-real-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-which-one-is-real-600x338.webp 600w" sizes="(max-width: 1672px) 100vw, 1672px" /></p>
<p style="text-align: justify;">The technology was never the obstacle. We spent twenty years believing it was.</p>
<h2>The Promise Arrived Before the Machine</h2>
<p style="text-align: justify;">Ask your data a question in plain English. That sentence has been sold to executives since the nineties. Every reporting product shipped a version of it, and every version was quietly retired.</p>
<p style="text-align: justify;">Each time it failed, we blamed the ears. The machine couldn&#8217;t understand the question, which was fair, because it couldn&#8217;t.</p>
<p style="text-align: justify;">So the promise sat on a shelf for two decades, waiting for hardware that could keep it. That excuse has now expired. Ask for the top ten customers by revenue last quarter, excluding internal accounts, and you get correct, well written SQL.</p>
<p style="text-align: justify;">We finally ran the experiment we&#8217;d been unable to run. And we found out the question was never the hard part.</p>
<h2>The Map and the Land</h2>
<p style="text-align: justify;">A database is a map of a business. It was drawn on a particular Tuesday, by people in a hurry. The business has been moving ever since.</p>
<p style="text-align: justify;">Think of mapmakers who keep adding detail. Every year they add the new road, the renamed village, the bridge that washed out. They never remove anything, because somebody could still be using it.</p>
<p style="text-align: justify;">Your database has a Customers table. It also has CustomersNew, Customer_Master, a view called vw_Customers_Current, and Customers_Backup_2019 that somebody swears one integration still reads.</p>
<p style="text-align: justify;">You know which one is real. You were there, or somebody told you. Or you queried the wrong one once and spent a day explaining the numbers.</p>
<p style="text-align: justify;">The machine has the whole map and has never walked the land. It picks the most convincing name. That is how it lands on Customer_Master, because whoever built the real replacement couldn&#8217;t use the good name. It was taken.</p>
<p style="text-align: justify;">So the SQL is perfect and the answer is wrong. It&#8217;s wrong in the worst way available, which is plausibly.</p>
<h2>The Word That Means Five Things</h2>
<p style="text-align: justify;">This is the one that ends these projects.</p>
<p style="text-align: justify;">Ask five people in a company what revenue means and you&#8217;ll get five answers. Gross or net. Before or after refunds. Booked when the order is placed, when it ships, or when the money lands.</p>
<p style="text-align: justify;">Finance has an answer. Sales has a different one. The board deck uses a third. All three are defensible, and all three are used daily by people who have never discovered that the others exist.</p>
<p style="text-align: justify;"><img decoding="async" class="wp-image-214315" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-one-word-five-roads.webp" alt="Painting of the word REVENUE chiselled into a stone slab, with five equally well-built stone roads leading away from it, each under its own different light and weather." width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-one-word-five-roads.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-one-word-five-roads-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-one-word-five-roads-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-one-word-five-roads-600x338.webp 600w" sizes="(max-width: 1672px) 100vw, 1672px" /></p>
<p style="text-align: justify;">A business user types &#8220;show me revenue by region.&#8221; The machine has to choose. It chooses reasonably, and it doesn&#8217;t mention that it chose, because it doesn&#8217;t feel the ambiguity as ambiguity.</p>
<p style="text-align: justify;">Your analyst, given the same question, asks one back. Revenue how, the finance way or the sales way? That question is the entire job. It has never appeared on anyone&#8217;s job description.</p>
<h2>Ninety Five Percent Is Not a Number You Can Use</h2>
<p style="text-align: justify;">Here&#8217;s the pattern I watched three times.</p>
<p style="text-align: justify;">Week one, everyone is delighted. Real questions, real answers, genuine excitement in the room.</p>
<p style="text-align: justify;">Week three, someone gets a number that looks off. An analyst checks it. The machine used the wrong table.</p>
<p style="text-align: justify;">Week four, everyone is back to asking the analyst. They now know they&#8217;ll have to ask the analyst to verify anyway. Asking twice is slower than asking once.</p>
<p style="text-align: justify;">That&#8217;s the whole failure, and notice what it isn&#8217;t. It isn&#8217;t accuracy in aggregate. It&#8217;s the impossibility of knowing which single answer to trust.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="wp-image-214316" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-ninety-five-doors.webp" alt="Painting of a long curved wall of one hundred identical cream doors, five of them leaking darkness underneath, with a small metal plate reading WHICH FIVE." width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-ninety-five-doors.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-ninety-five-doors-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-ninety-five-doors-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-ninety-five-doors-600x338.webp 600w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<p style="text-align: justify;">A tool that&#8217;s right ninety five percent of the time isn&#8217;t ninety five percent useful. Not when you can&#8217;t tell which five percent. For anything that matters it&#8217;s close to nothing, because every answer needs the same checking the old way needed.</p>
<h2>What the Ones That Worked Did</h2>
<p style="text-align: justify;">The companies getting value from this aren&#8217;t pointing it at the raw database.</p>
<p style="text-align: justify;"><strong>They drew an honest map first.</strong> A curated set of views and defined metrics, where revenue has exactly one meaning, agreed with finance, written down. That&#8217;s the only revenue the tool can reach, so the ambiguity is settled before the question is asked.</p>
<p style="text-align: justify;">That isn&#8217;t an AI project. It&#8217;s the data modeling work companies have postponed for a decade. AI made the postponement expensive enough to notice.</p>
<p style="text-align: justify;"><strong>They aimed it at analysts, not executives.</strong> The tool is worth most to people who can read what it writes. An analyst gets a correct first draft and adjusts it. A business user gets a number they can&#8217;t check.</p>
<p style="text-align: justify;"><strong>They made it show its work.</strong> Every answer displays the SQL and names the tables it touched. That sounds like it would scare people off. In practice it&#8217;s the only thing that catches the wrong table before the number reaches a slide.</p>
<h2>The Four Fifths Nobody Wrote Down</h2>
<p style="text-align: justify;">We assumed the analyst&#8217;s job was writing SQL, because writing SQL is the part you can watch someone do.</p>
<p style="text-align: justify;">It was never the SQL. The SQL was maybe a fifth of it.</p>
<p style="text-align: justify;">The rest was knowing which table is real. Knowing which definition the asker meant. Knowing the numbers before the system migration aren&#8217;t comparable. Knowing that when the head of sales says customers, they mean accounts, not contacts.</p>
<p style="text-align: justify;">None of that is written down anywhere. It lives in people. It transfers by sitting near someone for two years, which is an apprenticeship, and nobody ever called it that.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="wp-image-214317" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-four-fifths.webp" alt="Painting of a small tidy writing desk floating in the dark, held up by an enormous fading structure of shelves, letters and index cards below it, with an enamel sign on the desk reading NOBODY WROTE IT DOWN." width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-four-fifths.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-four-fifths-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-four-fifths-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/text-to-sql-four-fifths-600x338.webp 600w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<p style="text-align: justify;">Here&#8217;s the part I find strange. We automated the visible fifth, and the automation was flawless. That made the invisible four fifths appear for the first time. They were always holding the building up, and now they stand in plain view, entirely undocumented.</p>
<p style="text-align: justify;">That&#8217;s the opportunity here, and it has almost nothing to do with AI. Write the four fifths down, starting with what revenue means. Delete the tables that lie. Name the real one clearly enough that a stranger could find it.</p>
<p style="text-align: justify;">Do that, and the machine becomes useful. Skip it, and you&#8217;ve bought a fast way to be confidently wrong.</p>
<p style="text-align: justify;">I wrote about the part of this that lasts in <strong><a href="https://pinaldave.com/blog/prompting-is-not-the-skill.html" target="_blank" rel="noopener">Prompting Is Not the Skill</a></strong>. It&#8217;s an essay about why the tricks evaporate and the judgment compounds. It&#8217;s one of thirty essays in my book <strong>AI: Nobody&#8217;s in There. But we&#8217;re still in here.</strong> All of them are <strong><a href="https://pinaldave.com/blog/index.html" target="_blank" rel="noopener">free to read online</a></strong>, and the paperback is on <strong><a href="https://www.amazon.com/dp/B0H4T6W21S" target="_blank" rel="nofollow noopener">Amazon</a></strong>.</p>
<p style="text-align: justify;">If your map needs redrawing before you point a machine at it, that&#8217;s work I do with teams. You can see how it goes on my <strong><a href="https://blog.sqlauthority.com/consulting/">consulting page</a></strong>.</p>
<p style="text-align: justify;"><strong>Text to SQL is not a translation problem, it is a memory problem, and the memory was never written down.</strong></p>
<p style="text-align: justify;">Published by <strong>Pinal Dave</strong> on <a href="https://blog.sqlauthority.com/">SQLAuthority</a>. More of my work at <a href="https://pinaldave.com/" target="_blank" rel="noopener">pinaldave.com</a>.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/09/text-to-sql/">Text to SQL: The SQL Was Never the Hard Part</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/10/09/text-to-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">214318</post-id>	</item>
		<item>
		<title>Tokens and the Context Window: Out of the Window, Out of Mind</title>
		<link>https://blog.sqlauthority.com/2026/10/08/tokens-and-context-window-interview-questions/</link>
					<comments>https://blog.sqlauthority.com/2026/10/08/tokens-and-context-window-interview-questions/#respond</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Thu, 08 Oct 2026 01:30:00 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Book]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Professional Development]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=214868</guid>

					<description><![CDATA[<p>Part two of ten. Most of the surprises people hit with AI at work trace back to this one chapter. A model reads in tokens, holds only so many at once, and charges for each one. 1. What is a token? A token is the unit of text a model reads and writes. It can...</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/08/tokens-and-context-window-interview-questions/">Tokens and the Context Window: Out of the Window, Out of Mind</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Part two of ten. Most of the surprises people hit with AI at work trace back to this one chapter. A model reads in tokens, holds only so many at once, and charges for each one.</strong></p>
<p><img loading="lazy" decoding="async" class="wp-image-214859" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/ai-interview-book-the-window.webp" alt="Figure showing that the model sees only what fits in its context window, and everything else is gone." width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/ai-interview-book-the-window.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/ai-interview-book-the-window-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/ai-interview-book-the-window-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/ai-interview-book-the-window-1536x864.webp 1536w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<h2>1. What is a token?</h2>
<p style="text-align: justify;">A token is the unit of text a model reads and writes. It can be a whole word, part of a word, a chunk of a number or a punctuation mark. For common English text, a rough rule is about four characters per token.</p>
<p style="text-align: justify;"><strong>Why it matters.</strong> Tokens are how models are measured and billed. Context limits, prices and speed are all counted in tokens. Code and SQL use more tokens than you&#8217;d guess, because a name like SalesOrderDetailID splits into several pieces.</p>
<p style="text-align: justify;"><strong>Watch out.</strong> The four-characters rule is a rough guide for English. Other languages, numbers and code can run much higher. When the number matters, use the vendor&#8217;s own token counter.</p>
<h2>2. Why does AI struggle to count letters?</h2>
<p style="text-align: justify;">Because a token isn&#8217;t a word. A short, common word is usually one token, while a long or rare word splits into several. The model sees a few tokens, not ten letters, which is why it can miscount the letters in strawberry.</p>
<p style="text-align: justify;"><strong>Why it matters.</strong> The same blind spot shows up in data work. Character counts, string lengths and exact spelling checks are weak spots. Let SQL or a script do the counting, and let the model explain the result.</p>
<p style="text-align: justify;"><strong>The follow-up.</strong> &#8220;Why does it get simple arithmetic wrong sometimes?&#8221; Numbers are split into tokens too, and the model predicts digits rather than calculating them.</p>
<h2>3. What is a context window?</h2>
<p style="text-align: justify;">The most text a model can consider at once, measured in tokens. It holds the instructions, the conversation so far, any files you attached and the answer being written. Anything outside the window doesn&#8217;t exist for the model.</p>
<p style="text-align: justify;"><strong>What the interviewer wants.</strong> That on most models the answer counts against the same window. A long input can leave too little room for the reply.</p>
<p style="text-align: justify;"><strong>Watch out.</strong> Window sizes change with every model release, so don&#8217;t memorise a number. Say how you&#8217;d find it: the model&#8217;s documentation lists it.</p>
<h2>4. Why does AI lose track of a long file?</h2>
<p style="text-align: justify;">Fitting in the window doesn&#8217;t mean every detail gets used. Models can miss details in the middle of a long input, even when all of it fits. If the file doesn&#8217;t fit at all, the tool cuts, summarises or picks parts, and it doesn&#8217;t always say which.</p>
<p style="text-align: justify;"><strong>Why it matters.</strong> This is how you get a fix that uses a variable the AI never saw declared. It&#8217;s also how a summary skips the clause on page 40.</p>
<p style="text-align: justify;"><strong>Watch out.</strong> &#8220;Use a tool with a bigger window&#8221; is half an answer. A bigger window holds more, and it doesn&#8217;t decide what matters. Send the part that matters plus the definitions it depends on.</p>
<h2>5. What do temperature and top-p do?</h2>
<p style="text-align: justify;">Both control how the model picks the next token. Temperature sets how adventurous the choice is. Top-p keeps only the likeliest options whose chances add up to a set share, such as 90 percent.</p>
<p style="text-align: justify;"><strong>Why it matters.</strong> For SQL, summaries and data extraction, you want low temperature and repeatable answers. For brainstorming names or test data, a higher setting gives more variety.</p>
<p style="text-align: justify;"><strong>What the interviewer wants.</strong> That you match the setting to the job, and that you don&#8217;t promise identical output. Even at zero temperature, many services don&#8217;t guarantee the same answer twice.</p>
<h2>Five minutes, any AI assistant</h2>
<p style="text-align: justify;">Ask for the same query twice. First with nothing:</p>
<blockquote>
<p style="text-align: justify;">Write a SQL query for our top customers.</p>
</blockquote>
<p style="text-align: justify;">Then in a fresh chat, with the window filled properly:</p>
<blockquote>
<p style="text-align: justify;">Write a SQL query for SQL Server. Table: Sales.Orders (CustomerID, OrderDate, Amount). Return the 10 customers with the highest total Amount in 2024, with their totals.</p>
</blockquote>
<p style="text-align: justify;">Count the guesses in the first answer: table names, column names, the date range and what &#8220;top&#8221; even means. That gap is the whole lesson about context, and it took you a minute.</p>
<h2>Why this is worth a book</h2>
<p style="text-align: justify;">Chapter 2 has ten questions. It also covers system prompts, what happens when a conversation outgrows the window, zero-shot against few-shot prompting, prompt caching and why longer prompts cost more.</p>
<p style="text-align: justify;">The Senior question in that chapter is the one worth rehearsing: how would you give a model a large schema or codebase without blowing the window?</p>
<p style="text-align: justify;"><a href="https://blog.sqlauthority.com/2026/09/24/ai-interview-questions-book/">100 AI Interview Questions and Answers for Data Professionals</a> has 184 key terms alongside the hundred questions. It&#8217;s in <a target="_blank" rel="nofollow noopener" href="https://www.amazon.com/dp/B0HKK9VQ8Z">Kindle</a> (also on <a target="_blank" rel="nofollow noopener" href="https://www.amazon.in/dp/B0HKK9VQ8Z">Amazon.in</a>), <a target="_blank" rel="nofollow noopener" href="https://www.amazon.com/dp/B0HKN42ZDG">paperback</a> and <a target="_blank" rel="nofollow noopener" href="https://www.amazon.com/dp/B0HKL1PK8Q">audiobook</a>.</p>
<p style="text-align: justify;">Part three is about the square on the grid where the money goes: wrong, and sounding sure.</p>
<p style="text-align: justify;"><strong>Out of the window is not out of scope, it is out of mind.</strong></p>
<p style="text-align: justify;">Published by <strong>Pinal Dave</strong> on <a href="https://blog.sqlauthority.com/">SQLAuthority</a>. More of my work at <a href="https://pinaldave.com/" target="_blank" rel="noopener">pinaldave.com</a>.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/08/tokens-and-context-window-interview-questions/">Tokens and the Context Window: Out of the Window, Out of Mind</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/10/08/tokens-and-context-window-interview-questions/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">214868</post-id>	</item>
		<item>
		<title>Tech Expo Gujarat 2026: Join Me in Ahmedabad This November</title>
		<link>https://blog.sqlauthority.com/2026/10/07/tech-expo-gujarat-2026-join-me-in-ahmedabad-this-november/</link>
					<comments>https://blog.sqlauthority.com/2026/10/07/tech-expo-gujarat-2026-join-me-in-ahmedabad-this-november/#comments</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Wed, 07 Oct 2026 01:30:00 +0000</pubDate>
				<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[SQL Training]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=224865</guid>

					<description><![CDATA[<p>I'm speaking at Tech Expo Gujarat 2026, November 27 to 29 at GUCEC in Ahmedabad. My session, Competence Debt: AI Lets Us Ship What We Cannot Fix, is on Saturday, November 28. Here is what it covers and how to find me there.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/07/tech-expo-gujarat-2026-join-me-in-ahmedabad-this-november/">Tech Expo Gujarat 2026: Join Me in Ahmedabad This November</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>I&#8217;m speaking at Tech Expo Gujarat 2026, and I&#8217;d love to see you there.</strong> The expo runs from November 27 to 29, 2026, at the Gujarat University Convention and Exhibition Centre (GUCEC) in Ahmedabad. If you&#8217;re in Gujarat that weekend, come and say hello.</p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="wp-image-224863" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-cover.webp" alt="Painted portrait of Pinal Dave speaking at a lectern with two microphones on a deep blue stage, beside the words Pinal Dave, Competence Debt, AI Lets Us Ship What We Cannot Fix." width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-cover.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-cover-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-cover-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-cover-600x338.webp 600w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<h2>What the Expo Is About</h2>
<p style="text-align: justify;">Tech Expo Gujarat brings business owners, technology teams and decision makers into one place for three days. The theme this year is Beacon of Rising Innovation &amp; AI. The organizers expect more than 15,000 visitors, 250 exhibitors and 25 keynote speakers.</p>
<p style="text-align: justify;">That mix is what makes it interesting. Many of the visitors run small and medium companies. They don&#8217;t need another flashy demo. They need to know which technology will pay for itself, and which one will quietly eat the budget.</p>
<h2>My Session</h2>
<p style="text-align: justify;">My session is <strong>Competence Debt: AI Lets Us Ship What We Cannot Fix</strong>, on Saturday, November 28. The idea is simple. Every time you ship something you couldn&#8217;t have built yourself, you borrow. You didn&#8217;t steal it or cheat. The work is real, the result is fine and the customer is happy. But behind it sits a skill you now depend on and don&#8217;t own.</p>
<p style="text-align: justify;">The bill never arrives while things are going well. That&#8217;s not generosity. That&#8217;s how debt works.</p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="wp-image-224864" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-competence-debt.webp" alt="Gouache painting of a thriving toy workshop at closing time, shelves full of finished wooden toys in warm lamp light, while a desk drawer in the shadowed foreground is stuffed with unopened envelopes, a vermilion one on top." width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-competence-debt.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-competence-debt-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-competence-debt-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/10/tech-expo-gujarat-2026-competence-debt-600x338.webp 600w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<p style="text-align: justify;">There&#8217;s a live demo in the middle, and I&#8217;ll ask the room what happens next, so bring an opinion. We&#8217;ll also look at what working with AI does to a team over five years. Some borrowing is a home loan and some is a gold loan. We&#8217;ll talk about how to tell which one you&#8217;re carrying.</p>
<p style="text-align: justify;">It&#8217;s part technical and part philosophy. There&#8217;s no PowerPoint deck, only the demo and the conversation. I ran this test on my own work, and I failed it twice.</p>
<h2>Why I Said Yes</h2>
<p style="text-align: justify;">For twenty-five years, I&#8217;ve been the person called in when a database stops behaving and nobody knows why. Lately, more of those calls start with AI. The code shipped fast, it worked for months, and now nobody on the team can say why it broke.</p>
<p style="text-align: justify;">A room full of business owners is the right place for that conversation. The people who sign the checks carry this debt too, and most don&#8217;t know it. I&#8217;d rather they hear about it at an expo than during an outage.</p>
<h2>Come Say Hello</h2>
<p style="text-align: justify;">If you&#8217;re attending, find me after my session. Bring your slow query, your AI project that nobody can fix, or your question about where to start. I&#8217;m happy to talk shop. Details and registration are on the <strong><a target="_blank" rel="nofollow noopener" href="https://www.techexpogujarat.com/">Tech Expo Gujarat website</a></strong>.</p>
<p style="text-align: justify;">I first wrote about this idea in <strong><a target="_blank" rel="noopener" href="https://pinaldave.com/book/competence-debt-ai.html">Competence Debt: The Line Item No One Tracks</a></strong>. It&#8217;s an essay about the skills a team stops building when AI does the work. The session takes that essay into a live room. It&#8217;s one of thirty essays in my book <strong>AI: Nobody&#8217;s in There. But we&#8217;re still in here.</strong> All of them are <strong><a target="_blank" rel="noopener" href="https://pinaldave.com/book/index.html">free to read online</a></strong>, and the paperback is on <strong><a target="_blank" rel="nofollow noopener" href="https://www.amazon.com/dp/B0H4T6W21S">Amazon</a></strong>.</p>
<p style="text-align: justify;"><strong>Competence debt is not a reason to stop using AI, it is a reason to know what you borrowed.</strong></p>
<p>Published by <strong>Pinal Dave</strong> on <a href="https://blog.sqlauthority.com/">SQLAuthority</a>. More of my work at <a href="https://pinaldave.com/" target="_blank" rel="noopener">pinaldave.com</a>.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/07/tech-expo-gujarat-2026-join-me-in-ahmedabad-this-november/">Tech Expo Gujarat 2026: Join Me in Ahmedabad This November</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/10/07/tech-expo-gujarat-2026-join-me-in-ahmedabad-this-november/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">224865</post-id>	</item>
		<item>
		<title>SQL Server Network Latency: When the Database Isn&#8217;t the Slow Part</title>
		<link>https://blog.sqlauthority.com/2026/10/06/sql-server-network-latency/</link>
					<comments>https://blog.sqlauthority.com/2026/10/06/sql-server-network-latency/#respond</comments>
		
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Tue, 06 Oct 2026 01:30:00 +0000</pubDate>
				<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[Computer Network]]></category>
		<category><![CDATA[SQL Connection]]></category>
		<category><![CDATA[SQL DMV]]></category>
		<category><![CDATA[SQL Wait Stats]]></category>
		<guid isPermaLink="false">https://blog.sqlauthority.com/?p=214297</guid>

					<description><![CDATA[<p>SQL Server network latency can make a fast database look slow. An application that fetches 4,000 orders one query at a time pays for every round trip. I measured the loop against one query, tested what ASYNC_NETWORK_IO means, and show how to check your own round trip time.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/06/sql-server-network-latency/">SQL Server Network Latency: When the Database Isn&#8217;t the Slow Part</a></p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><strong>SQL Server network latency is the delay each request spends traveling between your application and the database. It slows down more applications than people expect. I&#8217;ve watched four people spend three weeks tuning indexes when the real problem was thirty-two milliseconds of ping.</strong></p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="wp-image-214293" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-one-fry-at-a-time.webp" alt="A drive-in burger stand order window at dusk with a tray holding a single French fry and an order ticket reading ONE FRY AT A TIME" width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-one-fry-at-a-time.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-one-fry-at-a-time-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-one-fry-at-a-time-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-one-fry-at-a-time-600x338.webp 600w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<p style="text-align: justify;">Network delay is rarely the first thing anyone checks. Before I look at a single query, I run one simple test. It takes five minutes, and it tells me where to look first.</p>
<h2>The First Question to Ask</h2>
<p style="text-align: justify;">An application is slow, and everyone agrees on that. Someone says the database is slow, because the database always gets blamed first. Then the team starts reading execution plans, the diagrams that show how SQL Server runs a query.</p>
<p style="text-align: justify;">Before any of that, ask one question. How long does the same query take when you run it on the server itself?</p>
<p style="text-align: justify;">Say it takes forty milliseconds on the server and nine seconds from the application. That gap is a clue, not a diagnosis. Compare the same statement, with the same parameter values and settings. Then measure the time inside SQL Server and the time in the client separately.</p>
<h2>The Round Trip Math</h2>
<p style="text-align: justify;">A round trip is one request from the application to SQL Server, plus the answer coming back. Say one round trip takes two milliseconds. That&#8217;s a healthy number on a local network, and nobody would complain about it.</p>
<p style="text-align: justify;">Now say the application loads a customer. Then it loops through that customer&#8217;s 4,000 orders and fetches each one with its own query. That&#8217;s 4,000 requests, one after another.</p>
<p style="text-align: justify;">At two milliseconds each, the trips alone add eight seconds. That assumes the requests run one at a time, with no overlap. The database is busy for only a small part of that time. It&#8217;s like asking a waiter for one French fry at a time and then blaming the kitchen.</p>
<h2>What I Measured</h2>
<p style="text-align: justify;">I tested this today on SQL Server 2025. I made a table of 200,000 orders, with 4,000 of them for one customer. The client ran on the same machine as SQL Server. The connection used shared memory, so there was no network path between separate machines.</p>
<p style="text-align: justify;">I warmed up both methods first, then ran them six times in alternating order. Fetching the 4,000 orders one query at a time took 395 to 664 milliseconds. Fetching all 4,000 with one query took 29 to 46 milliseconds. That&#8217;s 12 to 23 times faster, without any network between machines.</p>
<p style="text-align: justify;">SQL Server&#8217;s cached query statistics reported about 66 milliseconds of statement elapsed time per 4,000 executions. The rest of the client time includes request overhead, driver work and result handling. This test doesn&#8217;t separate those costs.</p>
<p style="text-align: justify;">On a real network, each of those 4,000 requests also pays the network delay. The eight seconds above is my calculation for two milliseconds per trip, not a measurement.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="wp-image-214294" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-round-trips.webp" alt="Chart of the same 4,000 orders fetched two ways: measured on one machine over shared memory, 4,000 queries took 395 to 664 milliseconds and one query took 29 to 46, plus a separate calculated panel for the round-trip delay alone at 2 milliseconds per trip" width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-round-trips.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-round-trips-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-round-trips-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-round-trips-600x338.webp 600w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<h2>How to Check Your Round Trip Time</h2>
<p style="text-align: justify;">The quick check is ping. Run it from the application server:</p>
<pre style="text-align: left;"><code>ping -n 20 yoursqlserver</code></pre>
<p style="text-align: justify;">Ping has two limits. Many firewalls block it, and it doesn&#8217;t include any of SQL Server&#8217;s own work. To time a small SQL request, run this in PowerShell on the application server. Use the same server name and connection settings as your application.</p>
<pre style="text-align: left;"><code>$cn = New-Object System.Data.SqlClient.SqlConnection "Server=yoursqlserver;Integrated Security=true"
$cn.Open()
$cmd = $cn.CreateCommand()
$cmd.CommandText = "SELECT 1"
for ($i = 0; $i -lt 20; $i++) { [void]$cmd.ExecuteScalar() }
$sw = [Diagnostics.Stopwatch]::StartNew()
for ($i = 0; $i -lt 200; $i++) { [void]$cmd.ExecuteScalar() }
$sw.Stop()
"Average SELECT 1 request time: {0:N2} ms" -f ($sw.Elapsed.TotalMilliseconds / 200)
$cn.Close()</code></pre>
<p style="text-align: justify;">It warms up, then sends 200 tiny queries on one open connection and prints the average. That&#8217;s request time, including SQL Server&#8217;s small share, not pure network delay. I ran it in Windows PowerShell 5.1 and PowerShell 7 on my test machine. It printed 0.19 and 0.35 milliseconds.</p>
<p style="text-align: justify;">Match your application&#8217;s encryption setting too. System.Data.SqlClient defaults Encrypt to false. Microsoft.Data.SqlClient changed that default to true in version 4.0. Add Encrypt=true to the connection string if your application encrypts.</p>
<p style="text-align: justify;">Here&#8217;s a rough guide from my own work. Under one millisecond points to the same data center. Twenty to sixty milliseconds points to traffic crossing a region or a VPN. Timing alone can&#8217;t prove where the traffic goes, so confirm the route with your network team.</p>
<p style="text-align: justify;">For sequential requests, ping time multiplied by request count gives a rough estimate of network delay. Ping doesn&#8217;t measure SQL traffic directly. Multiplying the SELECT 1 time includes driver and server overhead too.</p>
<h2>Latency Matters More Than Bandwidth</h2>
<p style="text-align: justify;">People like to quote bandwidth, but for this problem it&#8217;s seldom the issue. Bandwidth is how much data can move each second, like the width of a road. Latency is the delay on every single trip, like a traffic light.</p>
<p style="text-align: justify;">Take an application that sends many small requests, one after another. Give it a one gigabit link with forty milliseconds of latency. It will run slower than on a hundred megabit link with one millisecond. For large file transfers, bandwidth matters more.</p>
<h2>What ASYNC_NETWORK_IO Means</h2>
<p style="text-align: justify;">ASYNC_NETWORK_IO is a wait type that people misread. It doesn&#8217;t mean the network is broken. It means SQL Server has results ready, and the client hasn&#8217;t finished taking them yet.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="wp-image-214295" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-order-up.webp" alt="A drive-in stand pickup window with plates and trays lined up under warm heat lamps, nobody collecting them, and a sign reading ORDER UP" width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-order-up.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-order-up-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-order-up-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-order-up-600x338.webp 600w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<p style="text-align: justify;">I tested this too. A client asked for 200,000 rows and paused a little after every 1,000 rows. It ran on the same machine as SQL Server, over shared memory. In 21 of the 23 checks while its request was running, it was waiting on ASYNC_NETWORK_IO.</p>
<p style="text-align: justify;">For comparison, the same query read at full speed took 0.62 seconds. The wait showed up in both checks while its request was running. Every client needs some time to take its rows, so seeing this wait alone doesn&#8217;t establish a performance problem. In this test, adding pauses increased the recorded wait time.</p>
<p style="text-align: justify;">So this wait doesn&#8217;t prove the network is slow. In my test, the client was slow to take the rows. Microsoft lists other causes too: large results, a client short on memory or CPU, and network problems.</p>
<p style="text-align: justify;">In my experience, the cause is one of three things, in this order. The application does work on each row while the results are still arriving. The application asks for much more data than it uses. Or the link is slow, which is the least common and the one everybody guesses first.</p>
<h2>How to See It Right Now</h2>
<p style="text-align: justify;">This query shows the sessions waiting on ASYNC_NETWORK_IO at this moment. Run it on the server while the slow operation is running:</p>
<pre style="text-align: left;"><code>SELECT r.session_id, s.program_name, r.status, r.command, r.wait_type, r.wait_time AS wait_time_ms, r.last_wait_type
FROM sys.dm_exec_requests AS r
JOIN sys.dm_exec_sessions AS s ON s.session_id = r.session_id
WHERE r.wait_type = 'ASYNC_NETWORK_IO';</code></pre>
<p style="text-align: justify;">The program_name column shows the application name reported by the connection. Use it to find the client to investigate. An empty result doesn&#8217;t rule the wait out. Repeat the check while the operation runs.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="wp-image-214296" style="max-width: 100%; height: auto;" src="https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-waiting-client.webp" alt="Test results over shared memory on one machine: a slow client took 7.2 seconds and added 6,824 milliseconds of ASYNC_NETWORK_IO wait, while a fast reader of the same query took 0.62 seconds and added 379" width="1672" height="941" srcset="https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-waiting-client.webp 1672w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-waiting-client-500x281.webp 500w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-waiting-client-800x450.webp 800w, https://blog.sqlauthority.com/wp-content/uploads/2026/09/network-latency-waiting-client-600x338.webp 600w" sizes="auto, (max-width: 1672px) 100vw, 1672px" /></p>
<p style="text-align: justify;">You&#8217;ll also see people check sys.dm_os_wait_stats for this. That view totals completed waits since SQL Server started, or since someone cleared the statistics. It covers the whole instance, not one session. So take one reading, wait a minute, and take another:</p>
<pre style="text-align: left;"><code>SELECT wait_type, waiting_tasks_count, wait_time_ms
FROM sys.dm_os_wait_stats
WHERE wait_type = 'ASYNC_NETWORK_IO';</code></pre>
<p style="text-align: justify;">In my test, the total grew by 6,824 milliseconds while the slow client ran. It grew by 379 milliseconds during the fast control. Both queries need VIEW SERVER PERFORMANCE STATE on SQL Server 2022 and later, or VIEW SERVER STATE on earlier versions.</p>
<h2>What to Change</h2>
<p style="text-align: justify;"><strong>Stop the loop.</strong> Use one query that returns 4,000 rows, not 4,000 queries that return one row each. Many of these loops come from an ORM, a library that turns application code into database queries. The fix is to tell it to load the related rows in the same trip.</p>
<p style="text-align: justify;"><strong>Ask for less.</strong> SELECT * sends every column, even the ones the application never shows. Ten unused columns on 200,000 rows is real extra data for the client to receive. If the client keeps the result in memory, those columns also use memory.</p>
<p style="text-align: justify;"><strong>Move the work to the data.</strong> Say the application pulls a million rows only to add them up. Let SQL Server add them up and send back one number. In my experience, this is the biggest win in most of these cases.</p>
<p style="text-align: justify;"><strong>Move the application closer.</strong> Sometimes the application ends up in one region and the database in another, after a migration. No query tuning will fix that delay. Every round trip pays for the distance.</p>
<h2>Why This Keeps Happening</h2>
<p style="text-align: justify;">We reach for database tools, and database tools measure the database. They help us measure query execution, but they don&#8217;t explain every part of the application&#8217;s response time. The extra time can come from the client, connection handling or the network, and those tools don&#8217;t look there.</p>
<p style="text-align: justify;">So the next time someone says the database is slow, don&#8217;t open a query plan first. Ask them to run the same thing on the server, and write down both numbers.</p>
<p style="text-align: justify;">If both runs are slow, check server execution time and waits before choosing what to tune. If they don&#8217;t match, the difference tells you where to investigate next. It doesn&#8217;t prove that either the database or the network is at fault.</p>
<p style="text-align: justify;">If your application is slow and you can&#8217;t find where the time goes, this is the kind of problem I work on with teams. You can see how a consulting engagement works on my <strong><a href="https://blog.sqlauthority.com/consulting/">consulting page</a></strong>.</p>
<p style="text-align: justify;"><strong>A slow application is not proof of a slow database, it is proof that time is going somewhere.</strong></p>
<p style="text-align: justify;">Published by <strong>Pinal Dave</strong> on <a href="https://blog.sqlauthority.com/">SQLAuthority</a>. More of my work at <a href="https://pinaldave.com/" target="_blank" rel="noopener">pinaldave.com</a>.</p>
<p>First appeared on <a href="https://blog.sqlauthority.com/2026/10/06/sql-server-network-latency/">SQL Server Network Latency: When the Database Isn&#8217;t the Slow Part</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sqlauthority.com/2026/10/06/sql-server-network-latency/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">214297</post-id>	</item>
	</channel>
</rss>
