<?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: Prashant Patil</title>
    <description>The latest articles on DEV Community by Prashant Patil (@prashant_patil_49).</description>
    <link>https://dev.to/prashant_patil_49</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%2F3837365%2F9ba3206b-ef1f-45e9-b5f4-cd1973f436a6.png</url>
      <title>DEV Community: Prashant Patil</title>
      <link>https://dev.to/prashant_patil_49</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prashant_patil_49"/>
    <language>en</language>
    <item>
      <title>How Google AI Mode Works (Simple Explanation)</title>
      <dc:creator>Prashant Patil</dc:creator>
      <pubDate>Tue, 12 May 2026 15:34:30 +0000</pubDate>
      <link>https://dev.to/prashant_patil_49/how-google-ai-mode-works-simple-explanation-1fk4</link>
      <guid>https://dev.to/prashant_patil_49/how-google-ai-mode-works-simple-explanation-1fk4</guid>
      <description>&lt;p&gt;Google AI Mode is a new way of searching on Google where Artificial Intelligence (AI) gives direct answers instead of only showing a list of websites.&lt;/p&gt;

&lt;p&gt;Normally, when you search something on Google, you see many blue links. You open different websites to find your answer. But in AI Mode, Google itself reads information from many websites and creates a smart answer for you.&lt;/p&gt;

&lt;p&gt;It works more like talking to an AI assistant.&lt;/p&gt;

&lt;p&gt;For example, if you search:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Best laptop for coding under ₹60,000”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AI Mode may directly give:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recommended laptops&lt;/li&gt;
&lt;li&gt;Features comparison&lt;/li&gt;
&lt;li&gt;Pros and cons&lt;/li&gt;
&lt;li&gt;Buying suggestions&lt;/li&gt;
&lt;li&gt;Links to websites for more details&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of making you open 10 different pages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4fjx4uavygd4hp0h07fi.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4fjx4uavygd4hp0h07fi.webp" alt=" " width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  How Google AI Mode Generates Results
&lt;/h1&gt;

&lt;p&gt;Google AI Mode works in multiple steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Understand Your Question
&lt;/h2&gt;

&lt;p&gt;The AI first tries to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What you are asking&lt;/li&gt;
&lt;li&gt;Your intent&lt;/li&gt;
&lt;li&gt;Important keywords&lt;/li&gt;
&lt;li&gt;Context of the question&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;br&gt;
"Best protein for skinny beginners"&lt;/p&gt;

&lt;p&gt;Google understands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User is probably trying to gain muscle&lt;/li&gt;
&lt;li&gt;User is beginner&lt;/li&gt;
&lt;li&gt;User wants protein recommendations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2: Search the Internet
&lt;/h2&gt;

&lt;p&gt;Then Google searches across:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Websites&lt;/li&gt;
&lt;li&gt;Blogs&lt;/li&gt;
&lt;li&gt;Forums&lt;/li&gt;
&lt;li&gt;Product pages&lt;/li&gt;
&lt;li&gt;Reviews&lt;/li&gt;
&lt;li&gt;News articles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Google already has one of the biggest search indexes in the world. AI Mode uses this huge database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: AI Reads and Combines Information
&lt;/h2&gt;

&lt;p&gt;The AI model reads information from multiple sources and combines them into a single answer.&lt;/p&gt;

&lt;p&gt;Instead of showing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Website A&lt;/li&gt;
&lt;li&gt;Website B&lt;/li&gt;
&lt;li&gt;Website C&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It creates one summarized response.&lt;/p&gt;

&lt;p&gt;This is called:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI-generated summary&lt;/li&gt;
&lt;li&gt;AI overview&lt;/li&gt;
&lt;li&gt;Generative search result&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: Ranking and Verification
&lt;/h2&gt;

&lt;p&gt;Google still uses its traditional ranking systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Website authority&lt;/li&gt;
&lt;li&gt;Quality&lt;/li&gt;
&lt;li&gt;Trustworthiness&lt;/li&gt;
&lt;li&gt;Freshness of content&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is important because AI alone can sometimes generate wrong information.&lt;/p&gt;

&lt;p&gt;So Google combines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traditional search ranking&lt;/li&gt;
&lt;li&gt;AI language models&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Showing Follow-Up Suggestions
&lt;/h2&gt;

&lt;p&gt;After giving an answer, AI Mode often suggests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Related questions&lt;/li&gt;
&lt;li&gt;Follow-up searches&lt;/li&gt;
&lt;li&gt;Product comparisons&lt;/li&gt;
&lt;li&gt;Deeper explanations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This keeps the search conversational.&lt;/p&gt;




&lt;h2&gt;
  
  
  How is Google AI Mode Different From Gemini?
&lt;/h2&gt;

&lt;p&gt;Many people think Google AI Mode and Google Gemini are the same thing. But they are different.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Google AI Mode&lt;/th&gt;
&lt;th&gt;Gemini&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Built inside Google Search&lt;/td&gt;
&lt;td&gt;Separate AI assistant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Focused on web search&lt;/td&gt;
&lt;td&gt;Focused on conversation and tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uses live search results heavily&lt;/td&gt;
&lt;td&gt;Can answer from training knowledge too&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shows website links with answers&lt;/td&gt;
&lt;td&gt;More chatbot-style&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Better for finding information online&lt;/td&gt;
&lt;td&gt;Better for brainstorming, writing, coding&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Difference Between Google AI Mode and Other AI Chatbots
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Google AI Mode vs ChatGPT
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Google AI Mode&lt;/th&gt;
&lt;th&gt;ChatGPT&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Search-focused&lt;/td&gt;
&lt;td&gt;Conversation-focused&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uses real-time web search&lt;/td&gt;
&lt;td&gt;Depends on tools/web access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best for finding latest info&lt;/td&gt;
&lt;td&gt;Best for explanations and creativity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gives source links&lt;/td&gt;
&lt;td&gt;Can explain concepts deeply&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Google AI Mode vs Perplexity
&lt;/h3&gt;

&lt;p&gt;Perplexity AI is actually very similar to Google AI Mode.&lt;/p&gt;

&lt;p&gt;Both:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search the web&lt;/li&gt;
&lt;li&gt;Summarize information&lt;/li&gt;
&lt;li&gt;Give AI answers&lt;/li&gt;
&lt;li&gt;Show sources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The biggest difference is:&lt;/strong&gt;&lt;br&gt;
Google combines AI with its existing search engine, while Perplexity is built mainly as an AI-first search platform.&lt;/p&gt;




&lt;h2&gt;
  
  
  Is Google AI Mode Always Correct?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;No.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes AI Mode can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Misunderstand questions&lt;/li&gt;
&lt;li&gt;Give outdated information&lt;/li&gt;
&lt;li&gt;Mix incorrect facts&lt;/li&gt;
&lt;li&gt;Create "hallucinations" (fake information)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why Google still provides website links below the AI answer.&lt;/p&gt;

&lt;p&gt;You should still verify important information, especially for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Medical advice&lt;/li&gt;
&lt;li&gt;Financial decisions&lt;/li&gt;
&lt;li&gt;Legal topics&lt;/li&gt;
&lt;li&gt;Technical accuracy&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Google AI Mode is basically Google Search mixed with AI conversation.&lt;/p&gt;

&lt;p&gt;Instead of only showing websites, it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Understands your question&lt;/li&gt;
&lt;li&gt;Searches the web&lt;/li&gt;
&lt;li&gt;Reads multiple sources&lt;/li&gt;
&lt;li&gt;Creates a summarized answer&lt;/li&gt;
&lt;li&gt;Lets you continue asking questions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It is making search faster and more interactive.&lt;/p&gt;

&lt;p&gt;But it is not replacing websites completely. It still depends heavily on information created by websites and content creators across the internet.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>google</category>
      <category>learning</category>
    </item>
    <item>
      <title>The SQL Mistake Everyone Makes: Writing vs Execution Order</title>
      <dc:creator>Prashant Patil</dc:creator>
      <pubDate>Mon, 06 Apr 2026 18:25:40 +0000</pubDate>
      <link>https://dev.to/prashant_patil_49/the-sql-mistake-everyone-makes-writing-vs-execution-order-40lf</link>
      <guid>https://dev.to/prashant_patil_49/the-sql-mistake-everyone-makes-writing-vs-execution-order-40lf</guid>
      <description>&lt;p&gt;When I first started learning SQL, my approach was very straightforward. I would begin with the &lt;code&gt;SELECT&lt;/code&gt; statement, list the columns I wanted, add the &lt;code&gt;FROM&lt;/code&gt; clause, and then shape the query based on the problem.&lt;/p&gt;

&lt;p&gt;This worked well for simple queries. However, as problems became more complex, I repeatedly ran into the same issue: I had to rewrite queries from scratch because of small mistakes. This wasted time and slowed down my progress.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;The core issue was simple — I was writing SQL in the order it appears, not in the order it executes.&lt;/p&gt;

&lt;p&gt;Because of this, I:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applied filters at the wrong stage&lt;/li&gt;
&lt;li&gt;Misused aggregate functions&lt;/li&gt;
&lt;li&gt;Got incorrect results&lt;/li&gt;
&lt;li&gt;Rewrote queries multiple times&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Turning Point
&lt;/h2&gt;

&lt;p&gt;While watching a developer solve multiple SQL problems, I noticed a pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They rarely rewrote queries&lt;/li&gt;
&lt;li&gt;They followed a structured flow&lt;/li&gt;
&lt;li&gt;They thought in terms of execution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is when I realized:&lt;/p&gt;

&lt;p&gt;SQL is not executed in the order we write it.&lt;/p&gt;

&lt;p&gt;Understanding this changed everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  SQL Execution Order
&lt;/h2&gt;

&lt;p&gt;The actual execution order of SQL is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;FROM&lt;/li&gt;
&lt;li&gt;WHERE&lt;/li&gt;
&lt;li&gt;GROUP BY&lt;/li&gt;
&lt;li&gt;HAVING&lt;/li&gt;
&lt;li&gt;SELECT&lt;/li&gt;
&lt;li&gt;DISTINCT&lt;/li&gt;
&lt;li&gt;ORDER BY&lt;/li&gt;
&lt;li&gt;LIMIT&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each step transforms the data before passing it to the next stage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clause Breakdown
&lt;/h2&gt;

&lt;h3&gt;
  
  
  FROM
&lt;/h3&gt;

&lt;p&gt;Selects the base table and performs joins.&lt;/p&gt;

&lt;h3&gt;
  
  
  WHERE
&lt;/h3&gt;

&lt;p&gt;Filters rows before grouping.&lt;/p&gt;

&lt;h3&gt;
  
  
  GROUP BY
&lt;/h3&gt;

&lt;p&gt;Groups rows based on column values.&lt;/p&gt;

&lt;h3&gt;
  
  
  HAVING
&lt;/h3&gt;

&lt;p&gt;Filters grouped data.&lt;/p&gt;

&lt;h3&gt;
  
  
  SELECT
&lt;/h3&gt;

&lt;p&gt;Chooses columns and applies calculations.&lt;/p&gt;

&lt;h3&gt;
  
  
  DISTINCT
&lt;/h3&gt;

&lt;p&gt;Removes duplicates.&lt;/p&gt;

&lt;h3&gt;
  
  
  ORDER BY
&lt;/h3&gt;

&lt;p&gt;Sorts results.&lt;/p&gt;

&lt;h3&gt;
  
  
  LIMIT
&lt;/h3&gt;

&lt;p&gt;Restricts number of rows returned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Table: orders
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;order_id&lt;/th&gt;
&lt;th&gt;customer&lt;/th&gt;
&lt;th&gt;amount&lt;/th&gt;
&lt;th&gt;city&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;Pune&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;Mumbai&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;150&lt;/td&gt;
&lt;td&gt;Pune&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;300&lt;/td&gt;
&lt;td&gt;Delhi&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;250&lt;/td&gt;
&lt;td&gt;Mumbai&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Problem
&lt;/h3&gt;

&lt;p&gt;Find total order amount per city where total &amp;gt; 200 and sort descending.&lt;/p&gt;

&lt;h3&gt;
  
  
  Query
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;total_amount&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt;
&lt;span class="k"&gt;HAVING&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;total_amount&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Execution Walkthrough
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: FROM
&lt;/h3&gt;

&lt;p&gt;All rows are selected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: WHERE
&lt;/h3&gt;

&lt;p&gt;Filter &lt;code&gt;amount &amp;gt; 100&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Remaining rows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mumbai: 200, 250&lt;/li&gt;
&lt;li&gt;Pune: 150&lt;/li&gt;
&lt;li&gt;Delhi: 300&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: GROUP BY
&lt;/h3&gt;

&lt;p&gt;Groups formed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mumbai&lt;/li&gt;
&lt;li&gt;Pune&lt;/li&gt;
&lt;li&gt;Delhi&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4: HAVING
&lt;/h3&gt;

&lt;p&gt;Filter groups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mumbai (450) -&amp;gt; keep&lt;/li&gt;
&lt;li&gt;Pune (150) -&amp;gt; remove&lt;/li&gt;
&lt;li&gt;Delhi (300) -&amp;gt; keep&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 5: SELECT
&lt;/h3&gt;

&lt;p&gt;Result:&lt;br&gt;
| city   | total_amount |&lt;br&gt;
|--------|-------------|&lt;br&gt;
| Mumbai | 450         |&lt;br&gt;
| Delhi  | 300         |&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: ORDER BY
&lt;/h3&gt;

&lt;p&gt;Sorted descending:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mumbai&lt;/li&gt;
&lt;li&gt;Delhi&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;Do not think in terms of writing SQL.&lt;/p&gt;

&lt;p&gt;Think in terms of execution.&lt;/p&gt;

&lt;p&gt;This will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduce errors&lt;/li&gt;
&lt;li&gt;Improve speed&lt;/li&gt;
&lt;li&gt;Help solve complex queries&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Understanding SQL execution order is a fundamental skill. Once you start thinking in execution steps instead of syntax order, your ability to write efficient and correct queries improves significantly.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>dbms</category>
      <category>database</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Why Deleting `node_modules` Takes Forever on Windows</title>
      <dc:creator>Prashant Patil</dc:creator>
      <pubDate>Sat, 21 Mar 2026 16:56:18 +0000</pubDate>
      <link>https://dev.to/prashant_patil_49/why-deleting-nodemodules-takes-forever-on-windows-1h73</link>
      <guid>https://dev.to/prashant_patil_49/why-deleting-nodemodules-takes-forever-on-windows-1h73</guid>
      <description>&lt;p&gt;A few days ago, I was deleting a project when something unexpectedly frustrating happened — it took way too long.&lt;/p&gt;

&lt;p&gt;Not seconds. Not even a minute. It just kept going.&lt;/p&gt;

&lt;p&gt;If you’ve worked with JavaScript projects, you already know the culprit: &lt;code&gt;node_modules&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That moment got me thinking. Since I’ve been studying operating system fundamentals, I wanted to understand what’s actually happening behind the scenes. Why does a simple delete operation take so long?&lt;/p&gt;

&lt;p&gt;So I went down the rabbit hole — digging through documentation, GitHub discussions, and system-level explanations. I even explored how Linux handles file deletion to compare behaviors.&lt;/p&gt;

&lt;p&gt;Here’s what I found.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Reason Isn’t Just “Too Many Files”
&lt;/h2&gt;

&lt;p&gt;Yes, &lt;code&gt;node_modules&lt;/code&gt; contains thousands of files — sometimes hundreds of thousands.&lt;/p&gt;

&lt;p&gt;But that’s only part of the story.&lt;/p&gt;

&lt;p&gt;The real reason deletion is slow on Windows comes down to how the operating system handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File system operations
&lt;/li&gt;
&lt;li&gt;Security checks
&lt;/li&gt;
&lt;li&gt;Path resolution
&lt;/li&gt;
&lt;li&gt;File locking
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s break it down.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Windows Deletes Files One by One
&lt;/h2&gt;

&lt;p&gt;Unlike what many people assume, Windows does not delete folders in bulk.&lt;/p&gt;

&lt;p&gt;Instead, it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traverses every directory
&lt;/li&gt;
&lt;li&gt;Deletes each file individually
&lt;/li&gt;
&lt;li&gt;Updates metadata for every operation
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now imagine doing that for 100,000+ files.&lt;/p&gt;

&lt;p&gt;That alone creates noticeable delay.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. File Locking Adds Extra Overhead
&lt;/h2&gt;

&lt;p&gt;Windows uses a strict file locking mechanism.&lt;/p&gt;

&lt;p&gt;Before deleting a file, it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks whether the file is in use
&lt;/li&gt;
&lt;li&gt;Verifies parent directories
&lt;/li&gt;
&lt;li&gt;Temporarily locks parts of the directory structure
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If anything is being accessed — even indirectly — the system slows down or retries the operation.&lt;/p&gt;

&lt;p&gt;This adds friction, especially in deeply nested folders like &lt;code&gt;node_modules&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Windows Defender Is the Biggest Bottleneck
&lt;/h2&gt;

&lt;p&gt;This is where most of the time actually goes.&lt;/p&gt;

&lt;p&gt;Windows Defender scans files not just when they’re created or opened — but also when they’re deleted.&lt;/p&gt;

&lt;p&gt;That might sound unnecessary, but there’s a reason.&lt;/p&gt;

&lt;p&gt;Malware can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create harmful files
&lt;/li&gt;
&lt;li&gt;Execute them
&lt;/li&gt;
&lt;li&gt;Delete them quickly to avoid detection
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To prevent this, Windows scans files during deletion as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In many cases, 60–70% of the total deletion time is spent on Defender scans alone.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Long File Paths Make Things Worse
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;node_modules&lt;/code&gt; often contains deeply nested dependencies.&lt;/p&gt;

&lt;p&gt;This leads to extremely long file paths.&lt;/p&gt;

&lt;p&gt;Windows has historically had a path length limit (~260 characters). Even though modern systems support longer paths, many tools still struggle with them.&lt;/p&gt;

&lt;p&gt;When paths exceed limits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operations can fail
&lt;/li&gt;
&lt;li&gt;Windows retries them silently
&lt;/li&gt;
&lt;li&gt;Additional time is wasted
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. NTFS File System Overhead
&lt;/h2&gt;

&lt;p&gt;Windows uses the NTFS file system, which prioritizes reliability and consistency.&lt;/p&gt;

&lt;p&gt;For every file deletion, NTFS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updates logs
&lt;/li&gt;
&lt;li&gt;Maintains metadata
&lt;/li&gt;
&lt;li&gt;Ensures file system integrity
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Doing this for thousands of files significantly slows things down.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Linux and macOS Handle It Differently
&lt;/h2&gt;

&lt;p&gt;Unix-based systems take a much simpler and faster approach.&lt;/p&gt;

&lt;p&gt;They:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid heavy antivirus scanning during deletion
&lt;/li&gt;
&lt;li&gt;Use more efficient file unlinking mechanisms
&lt;/li&gt;
&lt;li&gt;Have fewer restrictions on file paths
&lt;/li&gt;
&lt;li&gt;Use a more flexible file locking model
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is a noticeable difference in performance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick Comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Windows (NTFS)&lt;/th&gt;
&lt;th&gt;Linux/macOS (ext4/APFS)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;File Deletion&lt;/td&gt;
&lt;td&gt;File-by-file with checks&lt;/td&gt;
&lt;td&gt;Faster unlinking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Antivirus&lt;/td&gt;
&lt;td&gt;Scans during deletion&lt;/td&gt;
&lt;td&gt;Typically no scan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Path Limits&lt;/td&gt;
&lt;td&gt;Historically restrictive&lt;/td&gt;
&lt;td&gt;More flexible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File Locking&lt;/td&gt;
&lt;td&gt;Strict&lt;/td&gt;
&lt;td&gt;More relaxed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance on &lt;code&gt;node_modules&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Slow&lt;/td&gt;
&lt;td&gt;Significantly faster&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Why Windows Prioritizes Safety
&lt;/h2&gt;

&lt;p&gt;At this point, it’s fair to ask: why does Windows do all this?&lt;/p&gt;

&lt;p&gt;The answer is simple — security.&lt;/p&gt;

&lt;p&gt;Without these checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Malware could create and delete files instantly
&lt;/li&gt;
&lt;li&gt;Those files might never be scanned
&lt;/li&gt;
&lt;li&gt;The system could be compromised silently
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So while it feels inefficient, it’s a deliberate design decision.&lt;/p&gt;




&lt;h2&gt;
  
  
  Can You Speed It Up?
&lt;/h2&gt;

&lt;p&gt;Yes — but every shortcut comes with trade-offs.&lt;/p&gt;

&lt;p&gt;Some practical options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use tools like &lt;code&gt;rimraf&lt;/code&gt; for faster deletion
&lt;/li&gt;
&lt;li&gt;Enable long path support in Windows
&lt;/li&gt;
&lt;li&gt;Use WSL (Windows Subsystem for Linux) for development workflows
&lt;/li&gt;
&lt;li&gt;Avoid reinstalling dependencies unnecessarily
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also disable real-time antivirus scanning temporarily, but that introduces risk and isn’t advisable for regular use.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Deleting &lt;code&gt;node_modules&lt;/code&gt; slowly on Windows isn’t a bug — it’s the result of intentional system design.&lt;/p&gt;

&lt;p&gt;Windows favors safety and control.&lt;br&gt;&lt;br&gt;
Unix-based systems favor speed and simplicity.&lt;/p&gt;

&lt;p&gt;Once you understand that trade-off, the behavior makes a lot more sense — even if it’s still frustrating.&lt;/p&gt;

</description>
      <category>microsoft</category>
      <category>discuss</category>
      <category>learning</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
