<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kritika Kumari on Medium]]></title>
        <description><![CDATA[Stories by Kritika Kumari on Medium]]></description>
        <link>https://medium.com/@kritikakumari122000?source=rss-8a6af010938b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U-wv9ttB6tesmidtm5jlaQ.jpeg</url>
            <title>Stories by Kritika Kumari on Medium</title>
            <link>https://medium.com/@kritikakumari122000?source=rss-8a6af010938b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:01:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kritikakumari122000/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Optimizing PostgreSQL Queries Without Losing Your Mind:]]></title>
            <link>https://medium.com/@kritikakumari122000/optimizing-postgresql-queries-without-losing-your-mind-030cfe485120?source=rss-8a6af010938b------2</link>
            <guid isPermaLink="false">https://medium.com/p/030cfe485120</guid>
            <dc:creator><![CDATA[Kritika Kumari]]></dc:creator>
            <pubDate>Fri, 17 Oct 2025 13:00:57 GMT</pubDate>
            <atom:updated>2025-10-17T13:04:06.457Z</atom:updated>
            <content:encoded><![CDATA[<p>You know that moment when everything looks fine — until your latency dashboard suddenly spikes and someone casually says,</p><blockquote><em>“It’s probably the database.”</em></blockquote><p>Yeah. Been there.</p><p>And in most cases, it’s not PostgreSQL’s fault. It’s ours — the overconfident queries we wrote at 2 AM that <em>worked fine on staging</em> and then silently became performance nightmares in production.</p><p>Over time, I’ve learned that optimizing queries doesn’t have to mean staring at query plans for hours. Here’s the simple process I follow when Postgres starts acting up (or rather, when <em>I</em> start making it act up).</p><h3>1. Start with Data, Not Assumptions</h3><p>Don’t start rewriting random queries. Start with facts. It pg_stat_statements is your best friend — it tells you which queries are slow and how often they’re being called.</p><pre>SELECT query, mean_exec_time, calls <br>FROM pg_stat_statements <br>ORDER BY total_exec_time DESC <br>LIMIT 5;</pre><p>Find the ones that are both slow <em>and</em> frequent — that’s where your users are feeling the pain.</p><h3>2. EXPLAIN (Literally)</h3><p>EXPLAIN (ANALYZE, BUFFERS) is magic. It shows you exactly how Postgres executes your query — whether it’s using indexes, scanning tables, or doing something unexpected.</p><p>If you see a <strong>Seq Scan</strong> on a table with millions of rows, that’s your first red flag.</p><h3>3. Index for Access Patterns</h3><p>Indexes are great — until they’re everywhere. Create them for <em>how</em> your data is queried, not just for every column that looks important.</p><pre>CREATE INDEX idx_orders_user_status <br>ON orders (user_id, status);</pre><p>Always check again with EXPLAIN. Sometimes the planner still prefers a sequential scan (especially with uneven data).</p><h3>4. Rewrite, Don’t Overengineer</h3><p>Most slow queries can be fixed with a rewrite, not a server tune-up.<br>For example, replace correlated subqueries with joins and avoid wrapping indexed columns in functions.</p><pre>-- Slow<br>SELECT * FROM users <br>WHERE id IN (<br>  SELECT user_id FROM orders WHERE total &gt; 1000<br>);</pre><pre>-- Better<br>SELECT u.* FROM users u<br>JOIN orders o ON u.id = o.user_id<br>WHERE o.total &gt; 1000;</pre><h3>5. Measure Again</h3><p>Every optimization is just a theory until you test it.<br> You can reduce a query performance from 2.4 s to 90 ms — just by adding a composite index and partitioning the table. No dark magic, just good observation.</p><p>💡 <strong>Takeaway:</strong><br> You don’t need to be a Postgres wizard to optimize queries.<br> You just need curiosity, patience, and a willingness to <em>measure before you fix</em>.</p><p>PostgreSQL isn’t usually the bottleneck.<br> We are.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=030cfe485120" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Prepared for Machine Coding Rounds]]></title>
            <link>https://medium.com/@kritikakumari122000/how-i-prepared-for-machine-coding-rounds-35f1c2039469?source=rss-8a6af010938b------2</link>
            <guid isPermaLink="false">https://medium.com/p/35f1c2039469</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[interview-tips]]></category>
            <category><![CDATA[coding-machine]]></category>
            <dc:creator><![CDATA[Kritika Kumari]]></dc:creator>
            <pubDate>Mon, 05 Feb 2024 04:31:56 GMT</pubDate>
            <atom:updated>2024-02-05T04:31:56.277Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*c4mFGtRPA7gQYQAb" /></figure><p>I never went through low-level design/machine coding rounds as a fresher. However, the machine coding round was a major part of the interview process I gave this time. Almost every company I interviewed went through an LLD <a href="http://round.here/">round.</a> Here are some resources I used for the preparation:</p><p><a href="https://workat.tech/machine-coding/article/how-to-ace-machine-coding-round-hi8lnpp8tlmo"><strong>WorkAt Tech Article on Machine Coding</strong></a></p><ul><li>An in-depth manual had been my starting point, providing valuable insights and strategies for acing machine coding rounds.</li></ul><p><a href="https://github.com/prasadgujar/low-level-design-primer/blob/master/solutions.md"><strong>Low-Level Design Primer by Prasad Gujar</strong></a></p><ul><li>Detailed solutions to various low-level design problems, giving a practical approach to solving similar problems.</li></ul><p><a href="https://www.youtube.com/playlist?list=PL12BCqE-Lp650Cg6FZW7SoZwN8Rw1WJI7"><strong>@Saumyajit’s LLD Playlist</strong></a></p><ul><li>I went through Saumyajit’s LLD YouTube playlist</li></ul><p><strong>LeetCode Discussion, GeeksforGeeks, Glassdoor:</strong></p><ul><li>I thoroughly looked over previously asked questions from these platforms to gain insight into the types of problems asked.</li></ul><p><strong>Hands-On Coding Practice:</strong></p><ul><li>I actively coded solutions for the problem statements, making a solid grasp of the concepts and improving the way I code.</li></ul><p><strong>Peer Discussions:</strong></p><ul><li>I connected with a friend for in-depth discussions on code optimisation strategies, debating the pros and cons of different approaches to improve my problem-solving skills.</li></ul><p>Sharing these valuable resources and experiences to support fellow tech enthusiasts! 💻✨</p><p>You can connect with me here<br>LinkedIn: <a href="https://www.linkedin.com/in/kritikaaa/">https://www.linkedin.com/in/kritikaaa/</a><br>Twitter : <a href="https://twitter.com/kritikatwtss">https://twitter.com/kritikatwtss</a></p><p>Also, feel free to schedule a call with me here: <a href="https://topmate.io/kritika_kumari">https://topmate.io/kritika_kumari</a></p><p>#MachineCoding #InterviewPrep #TechCareer</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35f1c2039469" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>