Friday, February 13, 2026

Db2 Performance Myths That Refuse to Die

After decades of working with IBM Db2 for z/OS, I’m continually surprised that some performance myths simply refuse to go away. Despite new releases, new features, and new hardware generations, the same half-truths and oversimplifications keep resurfacing in design meetings and tuning discussions.

Performance tuning is nuanced. It requires understanding tradeoffs, workload patterns, and business requirements. When we rely on myths instead of measurement, we risk making things worse—not better.

Let’s examine a few Db2 performance myths that deserve to be retired once and for all.

Myth #1: “More Indexes Always Improve Performance”

This may be the most persistent myth of them all. Yes, indexes can dramatically improve read performance. But every index carries overhead:

  • INSERTs must update every index.

  • DELETEs must remove entries from every index.

  • UPDATEs may require index maintenance.

  • REORG and RUNSTATS processing increases.

  • Log volume grows.

  • Buffer pool pressure increases.

In high-volume OLTP systems, excessive indexing can slow down transactional throughput far more than it speeds up queries. I’ve seen tables with 20, 30, even 50 indexes many of them rarely used.

Indexes should be created deliberately:

  • To support specific, critical access paths.

  • To enforce uniqueness or constraints.

  • To support clustering or partitioning strategies.

If you’re not actively verifying index usage with performance traces or accounting data, you’re guessing. And guessing is not tuning.

All of the above notwithstanding, there is a corrollary here that needs to be mentioned: There is no magic number of indexes! Sometimes people think the exact opposite of this myth, namely that there should be no mroe than 3 or 5 (or insert your favorite number here) indexes per table. And this can be just as dangerouse as believing that there is no impact to adding too many indexes!

Myth #2: “Buffer Pools Fix Everything”

Throwing memory at a performance problem is tempting. Increase the buffer pool. Expand real storage. Let caching solve it. Sometimes that works. Often it doesn’t.

Buffer pools help when:

  • You’re experiencing high synchronous I/O.

  • There’s clear evidence of poor hit ratios.

  • The workload has locality of reference.

But if your problem is:

  • Poor access paths

  • Missing or inaccurate statistics

  • Lock contention

  • Log bottlenecks

  • CPU-bound processing

Then increasing buffer pool size won’t solve the underlying issue.

I’ve seen shops double buffer pools and see zero improvement because the real issue was an inefficient access path causing millions of unnecessary GETPAGE operations.

Memory is powerful. But it’s not magic.

Myth #3: “RUNSTATS Solves Access Path Problems”

RUNSTATS is essential. But it is not a cure-all. Statistics allow the optimizer to make informed decisions, however be sure to heed the following:

  • If distribution statistics are missing, the optimizer may still misestimate.

  • If predicates are stage 2, statistics won’t fix the inefficiency.

  • If indexes are poorly designed, RUNSTATS won’t invent a better one.

  • If dynamic SQL varies significantly, access paths may still fluctuate.

More importantly, blindly running RUNSTATS can change access paths unexpectedly. I’ve seen stable systems destabilized because statistics were refreshed without understanding the impact.

Statistics should be:

  • Purposeful.

  • Consistent.

  • Aligned with workload patterns.

RUNSTATS informs the optimizer. It doesn’t override bad design.

Myth #4: “Static SQL Is Always Better Than Dynamic”

There was a time when this was mostly true. Today, it is clearly not the case.

Modern dynamic SQL in Db2 for z/OS benefits from:

  • Dynamic statement caching

  • Improved reoptimization options

  • Plan management capabilities

  • Statement concentration

  • Better access path stability controls

Dynamic SQL can be highly efficient, especially in distributed and API-driven environments where flexibility is essential. The real issue isn’t static versus dynamic, instead it is fitting the design to the use case and understanding options like:

  • Access path stability.

  • Parameter marker usage.

  • Proper bind options.

  • Monitoring and governance.

Poorly written static SQL can perform worse than well-managed dynamic SQL. The myth persists because it’s easier to rely on history than to evaluate modern capabilities.

Myth #5: “The Optimizer Always Knows Best”

The optimizer is incredibly sophisticated. But it is not omniscient. It depends making sure that you have a well-designed system with an understanding and implementation of:

  • Correct statistics options that are up-to-date and accurate

  • UInderstanding of data distribution 

  • Available indexes

  • Cost model estimates

There are cases where:

  • Business knowledge reveals data skew that the optimizer cannot detect.

  • A carefully crafted index improves performance dramatically.

  • Query rewrites reduce CPU by orders of magnitude.

Blind faith in the optimizer can lead to complacency. The best DBAs understand how the optimizer thinks (at least for the most part) and understand the best ways to guide it when that is necessary.

Myth #6: “If It’s Slow, It Must Be Db2”

This one might be my favorite. Or perhaps I should say least favorite!

When performance degrades, Db2 is often blamed first. But many problems originate elsewhere:

  • Application design issues

  • Network traffic

  • Inefficient commit frequency (or no commit strategy at all)

  • Lock escalation caused by poor transaction boundaries

  • Middleware configuration

  • Distributed request patterns

Db2 is frequently the messenger, not the culprit. Effective tuning requires end-to-end analysis. If you only look at Db2 metrics, you’re only seeing part of the picture.

The Real Lesson: Measure, Don’t Assume

Performance tuning in Db2 is not about rules of thumb. It’s about evidence.

Before:

  • Adding an index,

  • Increasing a buffer pool,

  • Running RUNSTATS,

  • Changing bind options, or

  • Rewriting SQL,

You need data. Data that can be found in:

  • Accounting (and other) traces,

  • Performance monitors,

  • Workload statistics, and

  • Access path analysis.

Myths persist because they contain a kernel of truth. But performance is contextual. What helps one workload can hurt another.

The best Db2 professionals:

  • Understand tradeoffs.

  • Measure impact.

  • Test changes.

  • And avoid one-size-fits-all thinking.

As Db2 environments continue to evolve adopting hybrid workloads, AI-driven applications, and distributed architectures, the need for disciplined performance analysis becomes even more critical.

Myths are comfortable. Measurement is harder.

But if you want predictable, scalable performance from Db2 for z/OS, evidence... not folklore... must drive your decisions.

Thursday, February 05, 2026

Mainframe Trends 2026

In the world of mainframes right now, the conversation has shifted from "How do we get off the mainframe?" to "How do we make the mainframe the heart of our AI and Hybrid Cloud strategy?"

As of early 2026, the hottest mainframe-related trends are focused on some form of AI adoption and integration on Z. Here are the mainframe trends that I see as of early February 2026.

Agentic AI & In-Transaction Inference

Mainframers are no longer just talking about basic machine learning. The focus is now on Agentic AI as organizations look to build autonomous AI agents that live on the mainframe to handle complex tasks like real-time fraud detection and "self-healing" operations.

The goal is to run AI models directly on the processor (IBM Telum-driven systems) so that every single transaction can be screened by AI and processed efficiently (less than 1 millisecond). Doing this can eliminate the "latency tax" of sending data to the cloud for analysis, which is a game-changer for banks and insurance companies.

Mainframe Modernization (The "Hybrid" Shift)

The "Rip and Replace" philosophy is effectively dead. Instead, the industry is obsessed with Hybrid Cloud Integration. DevOps is hot and developers are using tools like VS Code, Git, and Ansible to manage mainframes. Younger developers don't want to see a "green screen"; they want the mainframe to look and feel like any other cloud server.

In some cases, organizations are using AI-assisted refactoring, basically using generative AI to translate COBOL or Assembler programs into Java or Python. If not completely refactoring from one language to another more developers are relying on AI to document spaghetti code that hasn't been touched in 30 years.

Cyber Resilience & Quantum-Safe Security

With the rise of "harvest now, decrypt later" threats, mainframes are being positioned as the ultimate data fortress. Quantum-Safe Cryptography on the mainframe enables organizations to implement algorithms that can't be cracked by future quantum computers.

In Europe (but also impacting global firms), the Digital Operational Resilience Act (DORA) is a massive driver. Companies are using the mainframe’s inherent stability to prove they can withstand and recover from systemic cyberattacks.

The "Silver Tsunami" vs. The New Guard

The skills gap is a perennial topic, but in 2026, the focus has turned to Mainframe-as-a-Service (MFaaS) and automation to reduce the need for deep internals and systems knowledge.

Furthermore, more organizations are embracing automated operations using AI (AIOps) to manage system health. The promise of automation and AI is so that a smaller team can do the work that used to require dozens of senior systems programmers.

Summary

Of course, these are not the only mainframe trends hapening out there today, but they are the ones at the top of the list IMHO. What do you see? Are there any significant trends or issues that you are currently tackling? Share them here in a comment to get the conversation flowing.

Thursday, January 15, 2026

10 Reasons for the Success of Db2 for z/OS

Db2 for z/OS has proven successful for decades not because of any single feature, but because it consistently delivers on the things that matter most for mission-critical enterprise computing. The biggest reasons fall into a few clear and convincing categories.


1. Unmatched Reliability and Availability

At the top of the list is availability. Db2 for z/OS is engineered to run continuously, often measured in years of uptime rather than days or months.

Key contributors include:

  • Robust logging and recovery mechanisms

  • Online maintenance (schema changes, reorgs, index builds)

  • Data sharing across multiple Db2 members in a Parallel Sysplex

  • Automatic restart and failure isolation

For businesses where downtime directly translates to lost revenue, regulatory exposure, or reputational damage, this reliability is non-negotiable... and Db2 has consistently delivered it.

2. Exceptional Performance at Massive Scale

Performance is a hallmark of Db2 systems and applications. Db2 for z/OS excels at high-volume, high-concurrency transaction processing. It routinely handles:

  • Tens of thousands of transactions per second

  • Millions of SQL statements per hour

  • Thousands of concurrent users


This performance advantage is not accidental. Db2 is tightly integrated with IBM Z hardware features such as:

  • Specialty processors (zIIP, and previously zAAP which has been rolled into the zIIP funtionality)

  • Large memory footprints with sophisticated buffer management

  • Hardware-assisted compression and encryption

The result is predictable, repeatable performance even under extreme workloads.

3. Deep Integration with the z/OS Platform

Unlike databases that are merely hosted on an operating system, Db2 for z/OS is co-engineered with z/OS and IBM Z hardware.

This integration enables:

  • Advanced workload management (WLM)

  • Superior I/O handling

  • System-level security and auditing

  • Fine-grained resource governance

Because the database, OS, and hardware evolve together, Db2 can exploit platform innovations faster and more effectively than loosely coupled systems.

4. Rock-Solid Data Integrity and Consistency

Db2 for z/OS has earned a reputation as the system of record because it protects data integrity above all else.

This includes:

  • Full transactional integrity (ACID compliance)

  • Enforced referential integrity and constraints

  • Proven locking and concurrency control

  • Bulletproof recovery from failures

Enterprises trust Db2 with their most valuable data including financial records, customer accounts, order entry details, healthcare information, flight tracking and more. When correctness is not optional, Db2 for z/OS is the answer!

5. Security Built In, Not Bolted On

Security has always been foundational to Db2 for z/OS, not an afterthought.


Its strengths include:

  • Tight integration with RACF and z/OS security services

  • Granular authorization at table, column, and row levels

  • Native encryption for data at rest and in flight

  • Comprehensive auditing and compliance capabilities

For highly regulated industries, Db2 simplifies compliance while reducing risk exposure.

6. Backward Compatibility and Investment Protection

Few platforms can match Db2’s commitment to backward compatibility. Applications written decades ago often continue to run unchanged today.

This provides:

  • Long-term investment protection

  • Lower modernization risk

  • Predictable upgrade paths

Organizations can adopt new Db2 features incrementally without rewriting core applications which is a critical factor in long-term platform success.

7. Continuous Evolution Without Disruption


Db2 for z/OS has evolved continuously while maintaining stability. Over the years it has added:

  • Support for new SQL standards

  • XML and JSON capabilities

  • Temporal tables

  • Advanced analytics functions

  • RESTful access and modern connectivity

Importantly, these enhancements arrived without forcing disruptive migrations, a balance few platforms achieve.

8. Alignment with Business-Critical Workloads

Db2 for z/OS was designed from the start to support workloads that:

  • Cannot fail

  • Cannot lose data

  • Cannot tolerate unpredictable performance

Industries such as banking, insurance, government, retail, and transportation still depend on these characteristics. As long as these workloads exist, Db2’s value remains clear.

9. A Mature Ecosystem and Skilled Community

Db2 benefits from:

  • Decades of operational best practices

  • A rich ecosystem of tools (monitoring, tuning, recovery, automation)

  • A global community of experienced professionals

This maturity reduces risk and accelerates problem resolution which is another quiet, but powerful, contributor to its success.

10. Trust Earned Over Time

Perhaps the most important reason for Db2 for z/OS’s success is trust. Enterprises have seen it perform reliably through:

  • Hardware generations

  • Economic cycles

  • Technology shifts

  • Organizational change

That trust is hard to win... and even harder to replace.

In Summary

Db2 for z/OS has endured not because it resists change, but because it embraces change without compromising stability. Its success rests on a rare combination of reliability, performance, security, and evolution. And these qualities remain just as relevant today as when the platform was first introduced.

Monday, December 15, 2025

Happy Holidays 2025!


There are over two dozen holidays celebrated across the world between November 1st and January 15th? 

It is in that spirit that I want to wish all of my readers -- all over the world and no matter which of those holidays they celebrate -- a very Happy Holiday season!

This will be my last post of 2025, but I will be back posting more about the database management system that we all love -- Db2 -- again in 2026. So, be sure to check back regularly next year for more exciting Db2 content!
 
Happy Holidays, Seasons Greetings, Happy New Year, and All That Jazz!



Tuesday, November 11, 2025

Don't Forget About Histogram Statistics in Db2 for z/OS

There are a lot of options and parameters to consider when putting together your RUNSTATS jobs to collect statistics on your Db2 data. For those who do not know, RUNSTATS is a Db2 for z/OS utility program that is used to collect information about characteristics of tables and indexes, and storing that data in the Db2 Catalog where it can be used by the Db2 Optimizer to formulate SQL access paths. 

Without reasonable statistics, as collected by RUNSTATS, you will likely experience SQL performance problems because Db2 will be accessing the data based on incorrect or outdated information about your data. As I have discussed before, RUNSTATS is one of The 5 R's of Db2 Performance.

OK, with that introductory bit out of the way, one capability of RUNSTATS, first introduced in Db2 9 for z/OS is somewhat underutilized. As you might guess from the title of this blog post, I am talking about histogram statistics.

But what is a histogram? Well, in mathematical terms, a histogram is a representation of data that shows the distribution of data in a data set. Often represented using a bar graph, each bar represents the frequency of data points within a specific range. However, unlike a typical bar chart (displaying categorical data), a histogram groups numbers into ranges, making it useful for identifying patterns, such as underlying frequency distribution, outliers, and skew.


So, a histogram is a way of summarizing data that’s measured on an interval scale. A histogram is particularly helpful when you want:

  • to highlight how data is distributed, 
  • to determine if data is symmetrical or skewed, or 
  • to indicate whether or not outliers exist.

The histogram is appropriate only for variables whose values are numerical and measured on an interval scale. To be complete, let’s define interval, which is a set of real numbers between two numbers either including or excluding one or both of them.  


Histograms are generally most useful when dealing with large data sets.


Why Use Histogram Statistics?


Db2 historgram statistics can be quite useful for certain types of data. Instead of the frequency statistics, which are collected for only a subset of the data, sometimes Db2 can improve access path selection by estimating predicate selectivity from histogram statistics, which are collected over all values in a table space.


Histogram statistics can help the Db2 Optimizer estimate filtering when certain data ranges are heavily populated and others are sparsely populated. Think about data that represents customers of a diner. Typically, there will be periods of high activity (breakfast, lunch, dinner) and low activity (other periods). Or perhaps on a grander scale, consider data that represents customer activity at a big box store. During big sales (such a Black Friday) and over holidays (Christmas, for example), there will be more sales than during other periods.


Depending on the type and makeup of the data, it can make sense to collect histogram statistics to improve access paths for troublesome queries used with the following predicates: 

  • RANGE
  • LIKE, and 
  • BETWEEN

Histogram statistics also can help in some cases for equality (=), IS NULL, IN list, and COL op COL predicates.

 

How to Collect Histogram Statistics

 

OK, so how can you go about collecting histogram statistics? Well, the IBM RUNSTATS utility can collect statistics by quantiles. A quantile is the name for a bucket representing a range of data. For instance, from our diner example discussed earlier, you might want to have quantiles representing pre-breakfast, breakfast, pre-lunch, lunch, pre-dinner, dinner, and late night.


Db2 allows up to 100 quantiles. You can specify how many quantiles Db2 is to use: from one up to 100. Of course, specifying one isn’t wise because it’s the same as collecting for everything and so it will not be very helpful.


You do not explicitly define the make-up of quantiles, though. Db2 does that. Db2 creates equal-depth histogram statistics, dividing the whole range of values into quantiles that each contain about the same percentage of the total number of rows. 


You indicate that RUNSTATS should collect histogram statistics by coding the HISTOGRAM keyword in conjunction with the COLGROUP option. This way you can collect histogram statistics for a group of columns. You also must tell Db2 the number of quantiles to collect by specifying the NUMQUANTILES parameter. NUMQUANTILES also can be specified with the INDEX parameter, in which case it indicates that histogram statistics are to be collected for the columns of the index.

 

A single value can never be broken into more than one interval. This means the maximum number of intervals is equal to the number of distinct column values. For example, if you have 40 values, you can have no more than 40 quantiles, each consisting of a single value. In other words, be sure that you don’t specify a value for NUMQUANTILES that is greater than the total number of distinct values for the column (or column group) specified. Also, keep in mind that any NULLs will occupy a single interval.

 

So, then, how do you decide on the number of quantiles to collect? If you don’t specify NUMQUANTILES, the default value of 100 will be used; then based on the number of records in the table, Db2 will adjust the number of quantiles to an optimal number. Therefore, unless you have a good understanding of the application or a viable reason to deviate, a reasonable rule of thumb is to simply let NUMQUANTILES default and let Db2 work it out.

 

RUNSTATS will attempt to produce an equal-depth histogram. This means each interval will have about the same number of rows. Please note that this doesn’t mean the same number of values—it’s the same number of rows. In some cases, a highly frequent single value could potentially occupy an interval all by itself.

 

Where Are the Histogram Statistics Stored?

 

The following columns in a histogram statistics table define the interval: 

  • QUANTILENO - a sequence number that identifies the interval
  • HIGHVALUE - a value specifying the upper bound for the interval. 
  • LOWVALUE - a value specifying the lower bound for the interval

These columns can be found in the following six Db2 Catalog tables: 

  • SYSCOLDIST, 
  • SYSKEYTGTDIST, 
  • SYSCOLDIST_HIST, 
  • SYSCOLDISTSTATS, 
  • SYSKEYTGTDIST_HIST, and 
  • SYSKEYTGTDISTSTATS.

 

Here’s a sample RUNSTATS specification that collects histogram statistics for the key columns of the indexes on tables in the CSMTS02 table space:

 

RUNSTATS TABLESPACE DB.CSMTS02

  INDEX ALL

  HISTOGRAM NUMCOLS 2 NUMQUANTILES 10

  SHRLEVEL(CHANGE)

  UPDATE ALL

  REPORT YES

 

Summary

 

If you have troublesome queries on data that is skewed or disproportionately distributed, you should consider gathering histogram statistics. Keep in mind that running RUNSTATS specifying HISTOGRAM will probably consume more CPU than just gathering frequency distribution statistics, the performance gains from improved access paths for your queries could more than offset that cost.