<?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 MANOJ PRADHAN on Medium]]></title>
        <description><![CDATA[Stories by MANOJ PRADHAN on Medium]]></description>
        <link>https://medium.com/@manojpradhan_30659?source=rss-9c6cc0d0d392------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*irwXf-jRJLW5xYQL</url>
            <title>Stories by MANOJ PRADHAN on Medium</title>
            <link>https://medium.com/@manojpradhan_30659?source=rss-9c6cc0d0d392------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 05 Nov 2026 10:45:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manojpradhan_30659/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[How I Cut 10,000+ Db2 CPU Hours a Year: The Framework]]></title>
            <link>https://medium.com/@manojpradhan_30659/how-i-cut-10-000-db2-cpu-hours-a-year-the-framework-86d593d03ba3?source=rss-9c6cc0d0d392------2</link>
            <guid isPermaLink="false">https://medium.com/p/86d593d03ba3</guid>
            <category><![CDATA[performance-optimization]]></category>
            <category><![CDATA[performance-tuning]]></category>
            <category><![CDATA[db2-for-zos]]></category>
            <category><![CDATA[sql-tuning]]></category>
            <category><![CDATA[database-performance]]></category>
            <dc:creator><![CDATA[MANOJ PRADHAN]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 10:39:42 GMT</pubDate>
            <atom:updated>2026-11-04T10:39:42.588Z</atom:updated>
            <content:encoded><![CDATA[<h4>What 23+ years as a z/OS DBA taught me about turning tuning into a repeatable practice. Db2 13 for z/OS.</h4><p>For past 10+ years, I optimized 20+ Db2 for z/OS processes each year and cut more than 10,000 CPU hours every year.</p><p>No new hardware. No re-architecture. No big-bang project. The savings came from SQL rewrites and index changes, applied through a method I can repeat every month. This post is the overview. Over the coming weeks I’ll break down each stage with real numbers.</p><h3>The framework at a glance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*THXiIYNEktoOs_2AmcFWkA.png" /></figure><h3>1. Choose: rank by total CPU, not by complaints</h3><p>The loudest problem is rarely the most expensive one. I start from SMF 101 and take the top 50 CPU-consuming packages. Then, in IBM Query Monitor, I look inside them for a single SQL that accounts for at least 30% of the package’s CPU and is either heavy (an average of 5K+ getpages per execution) or high-volume (50K+ executions a day).</p><p>I then rank what is left by how fixable it is: clear access path inefficiencies first, such as non-matching index scans, full tablespace scans or a PROCSU of 10K or more, and then the sub-optimal ones, such as a low match column count. Peak-window work and critical-path batch jobs move up the list. Many top consumers get skipped, because they are already optimal and the effort would not pay off.</p><h3>2. Fix: two levers did the work</h3><p>Almost all of the savings came from two kinds of change: SQL rewrites and index changes. The fixes are often small. Here are four statements that show the range:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*-KrTSnXb14nr-O8ffoPk4g.png" /></figure><p>Those four statements alone account for over 1,000 of the 10,000+ hours. None of them looked alarming on its own: one cost 0.35 ms per execution. They only stood out when ranked by total CPU.</p><h3>3. Rebind safely: never rebind blind</h3><p>A change only pays off once packages pick it up, and a rebind is the moment the optimizer can change its mind about every statement in a package. So, I preview first with EXPLAIN(ONLY) and APCOMPARE(ERROR), evaluate which access paths would change, rebind only the reviewed list, and check for regression afterward. When a package regresses, SWITCH(PREVIOUS) is the quick fallback if nothing in it improved. If it has both gains and a regression, a hint restores just the bad statement. After one index change, I rebound 100+ dependent packages, 10+ statements in other programs improved, and nothing got worse.</p><h3>4. Prove: a saving no one believes isn’t a saving</h3><p>I baseline before changing anything, using IBM Query Monitor for statement-level CPU and SMF 101 for program-level CPU. I annualize as per-execution saving × current volume × run days, so workload changes never count as tuning. I report the figures to the application team and to management as soon as each item is done, and I roll them up monthly, as CPU hours and MSU. Each item is flagged as inside or outside the peak window, and I report the benefits that CPU doesn’t capture: critical-path time recovered, lock waits, deadlocks and timeouts.</p><h3>5. Repeat: it is a practice, not a project</h3><p>Workloads change, new code is deployed, and yesterday’s fix moves the next candidate to the top. I rerun the ranking every month. The 10,000 hours did not come from one heroic effort. They came from doing the same disciplined routine, over and over.</p><p><em>The skill is not finding clever fixes. It is knowing where to look, changing it safely, and proving the result.</em></p><p><em>What’s the biggest CPU win you’ve found in your environment, and what was behind it?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86d593d03ba3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>