<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Performance on Ivan Luminaria</title><link>https://ivanluminaria.com/en/tags/performance/</link><description>Recent content in Performance on Ivan Luminaria</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 24 Mar 2026 08:03:00 +0100</lastBuildDate><atom:link href="https://ivanluminaria.com/en/tags/performance/index.xml" rel="self" type="application/rss+xml"/><item><title>VACUUM and autovacuum: why PostgreSQL needs someone to clean up</title><link>https://ivanluminaria.com/en/posts/postgresql/vacuum-autovacuum-postgresql/</link><pubDate>Tue, 24 Mar 2026 08:03:00 +0100</pubDate><guid>https://ivanluminaria.com/en/posts/postgresql/vacuum-autovacuum-postgresql/</guid><description>&lt;p&gt;A couple of years ago I was asked to look at a production PostgreSQL
instance that &amp;ldquo;slows down every week&amp;rdquo;. Always the same pattern: Monday
is fine, Friday is a disaster. Someone restarts the service over the
weekend and the cycle starts again.&lt;/p&gt;
&lt;p&gt;Database around 200 GB. Main tables occupying nearly three times their
actual data size. Queries falling into sequential scans where they
shouldn&amp;rsquo;t have been. Response times climbing day after day.&lt;/p&gt;</description></item><item><title>Oracle on Linux: the kernel parameters nobody configures</title><link>https://ivanluminaria.com/en/posts/oracle/oracle-linux-kernel/</link><pubDate>Tue, 24 Feb 2026 08:03:00 +0100</pubDate><guid>https://ivanluminaria.com/en/posts/oracle/oracle-linux-kernel/</guid><description>&lt;p&gt;The client was a logistics company running Oracle 19c Enterprise Edition on Oracle Linux 8. Sixty concurrent users, a custom ERP application, about 400 GB of data. The server was a Dell PowerEdge with 128 GB of RAM and 32 cores.&lt;/p&gt;
&lt;p&gt;The complaints were vague but persistent: &amp;ldquo;The system is slow.&amp;rdquo; &amp;ldquo;Morning queries take twice as long as two months ago.&amp;rdquo; &amp;ldquo;Every now and then everything freezes for a few seconds.&amp;rdquo;&lt;/p&gt;</description></item><item><title>AWR, ASH and the 10 minutes that saved a go-live</title><link>https://ivanluminaria.com/en/posts/oracle/oracle-awr-ash/</link><pubDate>Tue, 10 Feb 2026 08:03:00 +0100</pubDate><guid>https://ivanluminaria.com/en/posts/oracle/oracle-awr-ash/</guid><description>&lt;p&gt;Friday, 6:40 PM. I already had my jacket on, ready to leave. The phone buzzes. It&amp;rsquo;s the project manager.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Ivan, we have a problem. The system is crawling. The go-live is tomorrow morning.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not the first time I&amp;rsquo;ve received a call like that. But the tone was different. This wasn&amp;rsquo;t the usual vague complaint about slowness. This was panic.&lt;/p&gt;
&lt;p&gt;I reconnect to the VPN, open a session on the client&amp;rsquo;s Oracle 19c database. First thing I do is a quick check:&lt;/p&gt;</description></item><item><title>When a LIKE '%value%' Slows Everything Down: A Real PostgreSQL Optimization Case</title><link>https://ivanluminaria.com/en/posts/postgresql/like-optimization-postgresql/</link><pubDate>Tue, 06 Jan 2026 08:03:00 +0100</pubDate><guid>https://ivanluminaria.com/en/posts/postgresql/like-optimization-postgresql/</guid><description>&lt;p&gt;A few weeks ago, a client contacted me with a very common issue:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Search in the admin console is slow. Sometimes it takes several
seconds. We&amp;rsquo;ve already reduced the JOINs, but the problem hasn&amp;rsquo;t
disappeared.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Environment: PostgreSQL on managed cloud.&lt;br&gt;
Main table: &lt;code&gt;payment_report&lt;/code&gt; (~6 million rows, 3 GB).&lt;br&gt;
Searched column: &lt;code&gt;reference_code&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Problematic query:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;reporting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payment_report&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;JOIN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;reporting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payment_cart&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cart_id&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;service_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1001&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reference_code&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;LIKE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;%ABC123%&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;created_at&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;LIMIT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="-first-observation-the-joins-were-not-the-problem" class="relative group"&gt;🧠 First observation: the JOINs were not the problem &lt;span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"&gt;&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#-first-observation-the-joins-were-not-the-problem" aria-label="Anchor"&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;I compared:&lt;/p&gt;</description></item><item><title>Oracle Partitioning: when 2 billion rows no longer fit in a query</title><link>https://ivanluminaria.com/en/posts/oracle/oracle-partitioning/</link><pubDate>Tue, 23 Dec 2025 08:03:00 +0100</pubDate><guid>https://ivanluminaria.com/en/posts/oracle/oracle-partitioning/</guid><description>&lt;p&gt;Two billion rows. You do not reach that number in a day. It takes years of transactions, movements, daily records piling up. And for all that time the database works, queries respond, reports come out. Then one day someone opens a ticket: &amp;ldquo;the monthly report takes four hours.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Four hours. For a report that six months earlier took twenty minutes.&lt;/p&gt;
&lt;p&gt;It is not a bug. It is not a network issue or slow storage. It is the physics of data: when a table grows beyond a certain threshold, the approaches that worked stop working. And if you did not design the structure to handle that growth, the database does the only thing it can: read everything.&lt;/p&gt;</description></item><item><title>EXPLAIN ANALYZE is not enough: how to actually read a PostgreSQL execution plan</title><link>https://ivanluminaria.com/en/posts/postgresql/explain-analyze-postgresql/</link><pubDate>Tue, 28 Oct 2025 08:03:00 +0100</pubDate><guid>https://ivanluminaria.com/en/posts/postgresql/explain-analyze-postgresql/</guid><description>&lt;p&gt;The other day a colleague sends me a screenshot on Teams. A query running on a 2-million-row table, 45 seconds execution time. He writes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;I ran EXPLAIN ANALYZE, but I can&amp;rsquo;t figure out what&amp;rsquo;s wrong. The plan looks fine.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Spoiler: the plan was anything but fine. The optimizer had chosen a &lt;span class="glossary-tip" tabindex="0" data-glossary-desc="Nested Loop Join — the join strategy that scans the inner table for each row of the outer table, ideal for small datasets with an index." data-glossary-url="https://ivanluminaria.com/en/glossary/nested-loop/" data-glossary-more="Read more →"&gt;nested loop&lt;/span&gt;
 join where a &lt;span class="glossary-tip" tabindex="0" data-glossary-desc="Hash Join — a join strategy optimized for large data volumes, based on a hash table built in memory." data-glossary-url="https://ivanluminaria.com/en/glossary/hash-join/" data-glossary-more="Read more →"&gt;hash join&lt;/span&gt;
 was needed, and the reason was trivial — stale statistics. But to get there I had to read the plan line by line, and that&amp;rsquo;s when I realized that most DBAs I know use EXPLAIN ANALYZE as a binary oracle: if the time is high, the query is slow. End of analysis.&lt;/p&gt;</description></item></channel></rss>