<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DanielNnadi</title>
    <description>The latest articles on DEV Community by DanielNnadi (@danielnnadi).</description>
    <link>https://dev.to/danielnnadi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3981516%2Fea105714-425a-457a-b9ad-30de671cd5a8.png</url>
      <title>DEV Community: DanielNnadi</title>
      <link>https://dev.to/danielnnadi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danielnnadi"/>
    <language>en</language>
    <item>
      <title>How I Cut SQL Query Time from 45 Seconds to 8 Seconds on 2.3 Million Rows</title>
      <dc:creator>DanielNnadi</dc:creator>
      <pubDate>Fri, 12 Jun 2026 15:35:45 +0000</pubDate>
      <link>https://dev.to/danielnnadi/how-i-cut-sql-query-time-from-45-seconds-to-8-seconds-on-23-million-rows-o3e</link>
      <guid>https://dev.to/danielnnadi/how-i-cut-sql-query-time-from-45-seconds-to-8-seconds-on-23-million-rows-o3e</guid>
      <description>&lt;p&gt;I inherited a SQL Server database with 2.3 million rows. Queries took 45 seconds. Users were frustrated. Dashboards timed out.&lt;/p&gt;

&lt;p&gt;Here is exactly what I did.&lt;/p&gt;

&lt;p&gt;Step 1: Find the slowest queries&lt;/p&gt;

&lt;p&gt;I used SQL Server's query store to identify the top 10 worst performing queries.&lt;/p&gt;

&lt;p&gt;Step 2: Check the execution plan&lt;/p&gt;

&lt;p&gt;Missing index warnings everywhere. Also saw table scans on a 2 million row table.&lt;/p&gt;

&lt;p&gt;Step 3: Add targeted indexes&lt;/p&gt;

&lt;p&gt;Created two non-clustered indexes on the most filtered columns. No over-indexing. Just what the queries actually needed.&lt;/p&gt;

&lt;p&gt;Step 4: Rewrite the worst join&lt;/p&gt;

&lt;p&gt;One query was joining 6 tables with a cross apply that made no sense. Restructured to inner joins with proper filter ordering.&lt;/p&gt;

&lt;p&gt;The result&lt;/p&gt;

&lt;p&gt;45 seconds down to 8 seconds. An 82% improvement. Real-time dashboards started working again.&lt;/p&gt;

&lt;p&gt;Key lesson&lt;/p&gt;

&lt;p&gt;Check what is actually slow before changing anything. Most people skip this and waste time optimizing the wrong thing.&lt;/p&gt;

&lt;p&gt;What is your fastest query optimization win?&lt;/p&gt;

</description>
      <category>sql</category>
      <category>database</category>
      <category>performance</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>How I Cut SQL Query Time from 45 Seconds to 8 Seconds on 2.3 Million Rows</title>
      <dc:creator>DanielNnadi</dc:creator>
      <pubDate>Fri, 12 Jun 2026 15:35:45 +0000</pubDate>
      <link>https://dev.to/danielnnadi/how-i-cut-sql-query-time-from-45-seconds-to-8-seconds-on-23-million-rows-45o4</link>
      <guid>https://dev.to/danielnnadi/how-i-cut-sql-query-time-from-45-seconds-to-8-seconds-on-23-million-rows-45o4</guid>
      <description>&lt;p&gt;I inherited a SQL Server database with 2.3 million rows. Queries took 45 seconds. Users were frustrated. Dashboards timed out.&lt;/p&gt;

&lt;p&gt;Here is exactly what I did.&lt;/p&gt;

&lt;p&gt;Step 1: Find the slowest queries&lt;/p&gt;

&lt;p&gt;I used SQL Server's query store to identify the top 10 worst performing queries.&lt;/p&gt;

&lt;p&gt;Step 2: Check the execution plan&lt;/p&gt;

&lt;p&gt;Missing index warnings everywhere. Also saw table scans on a 2 million row table.&lt;/p&gt;

&lt;p&gt;Step 3: Add targeted indexes&lt;/p&gt;

&lt;p&gt;Created two non-clustered indexes on the most filtered columns. No over-indexing. Just what the queries actually needed.&lt;/p&gt;

&lt;p&gt;Step 4: Rewrite the worst join&lt;/p&gt;

&lt;p&gt;One query was joining 6 tables with a cross apply that made no sense. Restructured to inner joins with proper filter ordering.&lt;/p&gt;

&lt;p&gt;The result&lt;/p&gt;

&lt;p&gt;45 seconds down to 8 seconds. An 82% improvement. Real-time dashboards started working again.&lt;/p&gt;

&lt;p&gt;Key lesson&lt;/p&gt;

&lt;p&gt;Check what is actually slow before changing anything. Most people skip this and waste time optimizing the wrong thing.&lt;/p&gt;

&lt;p&gt;What is your fastest query optimization win?&lt;/p&gt;

</description>
      <category>sql</category>
      <category>database</category>
      <category>performance</category>
      <category>dataengineering</category>
    </item>
  </channel>
</rss>
