<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Database on My New Hugo Project</title><link>https://example.org/en/db/</link><description>Recent content in Database on My New Hugo Project</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Blog Author</copyright><lastBuildDate>Sat, 15 Aug 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://example.org/en/db/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting Started with PostgreSQL</title><link>https://example.org/en/db/postgresql-intro/</link><pubDate>Sat, 15 Aug 2026 10:00:00 +0800</pubDate><guid>https://example.org/en/db/postgresql-intro/</guid><description>&lt;h2 class="relative group"&gt;What is PostgreSQL&#10; &lt;div id="what-is-postgresql" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-is-postgresql" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;PostgreSQL is a powerful open-source relational database known for its &lt;strong&gt;reliability&lt;/strong&gt; and &lt;strong&gt;extensibility&lt;/strong&gt;, supporting rich data types, full-text search, JSON, and geospatial processing.&lt;/p&gt;</description></item><item><title>SQL Query Performance Tuning</title><link>https://example.org/en/db/sql-tuning/</link><pubDate>Sat, 15 Aug 2026 09:00:00 +0800</pubDate><guid>https://example.org/en/db/sql-tuning/</guid><description>&lt;h2 class="relative group"&gt;Finding slow queries&#10; &lt;div id="finding-slow-queries" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#finding-slow-queries" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Enable the slow-query log: &lt;code&gt;log_min_duration_statement&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Analyze plans with &lt;code&gt;EXPLAIN ANALYZE&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Watch &lt;code&gt;pg_stat_statements&lt;/code&gt; for the most frequent SQL&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Common performance killers&#10; &lt;div id="common-performance-killers" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#common-performance-killers" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Full table scans&lt;/strong&gt;: missing indexes or conditions that can&amp;rsquo;t use them&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Implicit type casts&lt;/strong&gt;: functions on indexed columns disable the index&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;N+1 queries&lt;/strong&gt;: querying row-by-row inside a loop&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Large-offset pagination&lt;/strong&gt;: &lt;code&gt;OFFSET 1000000&lt;/code&gt; gets slower as you page&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Fixes&#10; &lt;div id="fixes" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#fixes" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Rewrite SQL: drive big tables with small result sets (join order)&lt;/li&gt;&#10;&lt;li&gt;Use indexes wisely: covering and composite indexes&lt;/li&gt;&#10;&lt;li&gt;Denormalize judiciously: precomputed summary tables&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Summary&#10; &lt;div id="summary" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#summary" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;SQL tuning is about &lt;strong&gt;understanding the execution plan&lt;/strong&gt;. Locate the bottleneck first, then fix it — don&amp;rsquo;t blindly add indexes.&lt;/p&gt;</description></item><item><title>Database Backup and Recovery Guide</title><link>https://example.org/en/db/backup-recovery/</link><pubDate>Fri, 14 Aug 2026 09:00:00 +0800</pubDate><guid>https://example.org/en/db/backup-recovery/</guid><description>&lt;h2 class="relative group"&gt;Why backups matter&#10; &lt;div id="why-backups-matter" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-backups-matter" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Data is the core asset of any system. Hardware failure, human error, ransomware — any incident can cause irrecoverable loss. &lt;strong&gt;Data without a backup is not data.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>PostgreSQL Index Tuning in Practice</title><link>https://example.org/en/db/postgresql-index-tuning/</link><pubDate>Thu, 13 Aug 2026 09:00:00 +0800</pubDate><guid>https://example.org/en/db/postgresql-index-tuning/</guid><description>&lt;h2 class="relative group"&gt;Why indexes matter&#10; &lt;div id="why-indexes-matter" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-indexes-matter" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Without an index, table scans are O(n) — queries degrade quickly as data grows. A good index brings lookups down to O(log n).&lt;/p&gt;</description></item></channel></rss>