<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Indexing on Chen Kai Blog</title><link>https://www.chenk.top/en/tags/indexing/</link><description>Recent content in Indexing on Chen Kai Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 19 Apr 2024 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/en/tags/indexing/index.xml" rel="self" type="application/rss+xml"/><item><title>Databases (2): Indexing and Query Planning — How Databases Find Your Data</title><link>https://www.chenk.top/en/databases/02-indexing-and-query-planning/</link><pubDate>Fri, 19 Apr 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/databases/02-indexing-and-query-planning/</guid><description>&lt;p>A query that returns in 2 milliseconds on your laptop with 1,000 rows will take 45 seconds on a production database with 50 million rows — unless you have the right indexes. Indexes are the single most impactful performance tool in your database toolkit, and understanding how they work changes the way you think about every schema and every query you write.&lt;/p>
&lt;hr>
&lt;h2 id="the-fundamental-problem-finding-a-row" class="heading-anchor">The Fundamental Problem: Finding a Row&lt;a href="#the-fundamental-problem-finding-a-row" class="heading-link" aria-label="Permalink to this section" title="Copy link to this section">#&lt;/a>
&lt;/h2>&lt;p>Imagine a table with 10 million rows, stored on disk as a heap file. Each row sits somewhere in a sequence of 8 KB pages. When you run:&lt;/p></description></item></channel></rss>