Db2 13 application performance on z/OS is decided far more by how packages are bound and how SQL is written than by anything a new function level switches on. That holds at function level 510, which IBM delivered in October 2026 through APAR PH72548. FL 510 contains nothing that makes a statement run faster. What matters to application teams arrived earlier, between FL 100 and FL 509, and a fair share of it stays dormant until a package is rebound or its APPLCOMPAT level is raised.
Below are nine techniques we apply when a Db2 13 application is slower or more lock-bound than it should be. Each one names the function level it depends on, plus the catalog table, EXPLAIN table or command that shows whether it worked. We have no z/OS lab figures to publish, so the only performance number quoted here is IBM's own and is labelled that way. Buffer pools, zIIP eligibility and DDF threads are covered in our Db2 z/OS tuning playbook for FL 509. This post stays on the application side of the thread.
Where Db2 13 stands at function level 510
Db2 13 for z/OS has been generally available since May 2022 and is still the current version. IBM has confirmed that a successor is planned and, according to the note it published through IDUG, does not expect to ship it before 2028. Until then, new function arrives in function levels, roughly every April and October. IBM's Db2 13 function levels page is the authority. Figure 1 keeps only the entries that change application performance or the way an application team works.
Figure 1. Db2 13 function levels that matter to application teams, and what it takes to switch each one on.
Db2 13 FL 510 itself is an administration release. TRANSFER OWNERSHIP now covers aliases, global variables, triggers and user-defined types. A basic trigger can capture the unit of recovery identifier, and Db2 writes the commit or rollback outcome to a z/OS log stream named by the LOG_STREAM_NAME subsystem parameter. That parameter is not online-changeable, so plan a restart. The catalog also gains SYSIBM.SYSTEM_INFO, created DEFINE NO for a later capability. All of it is useful, and none of it is a tuning lever.
1. Find out which level your packages actually run at
Three levels get mixed up in status meetings: code level, catalog level and function level. A fourth one, APPLCOMPAT, is set per package, and it is the only one the application sees. Start with the group, then count packages by compatibility level.
-DISPLAY GROUP DETAIL
-- Packages used in the last 90 days, by application compatibility level
SELECT APPLCOMPAT,
COUNT(*) AS package_count,
MAX(LASTUSED) AS most_recent_use
FROM SYSIBM.SYSPACKAGE
WHERE LASTUSED >= CURRENT DATE - 90 DAYS
GROUP BY APPLCOMPAT
ORDER BY APPLCOMPAT
WITH UR;
DSN7100I in the command output reports the current, highest activated and highest possible function levels. A subsystem at V13R1M510 with most packages at V12R1M500 is a normal state and not a defect. APPLCOMPAT governs SQL syntax and behaviour. Optimizer and runtime improvements come from the rebind, whatever the compatibility level says. Keeping those two ideas apart saves a lot of unnecessary regression testing.
What arrives without a code change, and what still needs a rebind
Several Db2 13 gains run inside the engine. At FL 100 IBM lists index look-aside optimizations for INSERT, UPDATE and DELETE, sort improvements including wider use of the SORTL instruction on z15 and later, and one retry for the partition lock before an insert into a partition-by-growth table space moves on to the next partition. FL 500 extends fast index traversal to unique keys of up to 128 bytes and non-unique keys of up to 120. No SQL changes for any of this.
The catch sits in IBM's performance guide: optimization enhancements reach static SQL only after a BIND or REBIND. A COBOL batch suite last bound under Db2 11 is still executing decisions Db2 11 made. Migration to Db2 13 alone does not change that.
2. Rebind in two passes and keep the way back
We split the rebind. The first pass asks Db2 to reuse existing access paths wherever it can, which regenerates the package at the current level with little access path risk. APCOMPARE reports where reuse failed. The second pass is selective. For the packages that dominate class 7 accounting time, rebind without APREUSE, EXPLAIN the result and compare PLAN_TABLE rows before and after.
//REBIND EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DISP=SHR,DSN=&DB2HLQ..SDSNLOAD
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(&SSID)
REBIND PACKAGE(ORDCOLL.*) -
APREUSE(WARN) -
APCOMPARE(WARN) -
PLANMGMT(EXTENDED) -
EXPLAIN(YES)
END
/*
Blast radius is the collection named in the REBIND and nothing else. PLANMGMT(EXTENDED) keeps the previous and original copies, so the rollback is a catalog operation that needs no DBRM:
REBIND PACKAGE(ORDCOLL.ORDP010) SWITCH(PREVIOUS)
Since Db2 13 FL 508, rebind phase-in also covers SQL PL routine and trigger packages, so these no longer need a quiet window. Raise APPLCOMPAT separately, and only for packages whose SQL needs a newer level. Check IBM's incompatible-change list for the target level before doing so.
Db2 application performance starts at the predicate
Every predicate is applied at one of three places, and the place decides the cost. The index manager applies matching and screening predicates. The data manager applies stage 1 predicates on the page. Whatever is left goes to relational data services as stage 2, after the row has been retrieved. A query that filters most of its rows at stage 2 pays getpage and CPU cost for rows it then throws away.
Figure 2. Predicate evaluation in Db2 13: the later a row is rejected, the more it has already cost.
3. Read the stage from DSN_PREDICAT_TABLE, not from an old checklist
Many shop standards still carry predicate lists written for DB2 V8. Some entries are out of date. Since Db2 11 the optimizer rewrites several common column expressions, among them YEAR(col), DATE(col) and SUBSTR starting at position 1, into indexable ranges. Other patterns, such as arithmetic on the column, remain stage 2. EXPLAIN settles it.
EXPLAIN PLAN SET QUERYNO = 5101 FOR SELECT order_id, customer_id, net_amount FROM ord.customer_order WHERE net_amount * 1.18 > :hv_limit; SELECT QBLOCKNO, PREDNO, STAGE, SEARCHARG, FILTER_FACTOR, TEXT FROM DSN_PREDICAT_TABLE WHERE QUERYNO = 5101 ORDER BY QBLOCKNO, PREDNO; -- Same result set, expression moved off the column SELECT order_id, customer_id, net_amount FROM ord.customer_order WHERE net_amount > :hv_limit_before_tax;
The STAGE column reads MATCHING, SCREENING, STAGE1 or STAGE2. In the rewritten statement the program computes the threshold once and passes it in, which leaves a bare column that an index on net_amount can match. Watch decimal rounding when moving arithmetic into the program, and compare result counts before promoting the change.
4. Re-explain large residual IN-lists after FL 506
Before Db2 13 FL 506, a residual IN predicate was evaluated as a chain of OR comparisons, item by item. FL 506 adds a different method for these lists. IBM's function level 506 description says a single-table query with one large residual IN-list is "potentially achieving up to 90% CPU time improvement". That is IBM's figure, and IBM notes it varies with query complexity. We have not measured it.
Eligibility is narrow. The left side must be a column expression that would be searchable as a plain column, the right side must hold only literals or literal expressions, and the list has to be large enough to pay off. After a rebind or a fresh prepare, look for the marker rather than assuming:
SELECT QUERYNO, PREDNO, STAGE, LEFT_HAND_SIDE, RIGHT_HAND_SIDE FROM DSN_PREDICAT_TABLE WHERE RIGHT_HAND_SIDE = 'INDEXED_VALUE' ORDER BY QUERYNO, PREDNO;
Fewer trips between the program and Db2
5. Move rows in sets
Each SQL call crosses from the application address space into Db2 and back. In an accounting report the cost shows up as class 2 CPU spread across a very high SQL call count. Multi-row FETCH and INSERT with host-variable arrays have been the embedded SQL answer for years. Db2 13 FL 506 adds a multi-row VALUES clause on INSERT, at APPLCOMPAT V13R1M506 or higher. That helps dynamic SQL from Java, Python and REST services, where arrays are awkward.
INSERT INTO ord.order_event (order_id, event_code, event_ts)
VALUES (:hv_order_id, 'PICKED', CURRENT TIMESTAMP),
(:hv_order_id, 'PACKED', CURRENT TIMESTAMP),
(:hv_order_id, 'SHIPPED', CURRENT TIMESTAMP);
-- Existence check: stop at the first qualifying row
SELECT 1
FROM ord.customer_order
WHERE customer_id = :hv_customer_id
FETCH FIRST 1 ROW ONLY;
Commit scope belongs to the same review. Rare commits hold locks longer, lengthen rollback and get in the way of online REORG. Very frequent commits spend the saving on log writes. Decide per workload and write the decision down, because the next developer will otherwise copy whichever loop is nearest.
Lock waits are now an application decision
Before Db2 13, one subsystem parameter, IRLMRWT, set the lock wait for everybody. An online transaction that should give up after three seconds waited as long as an overnight batch job. Db2 13 moves that choice into the application, as Figure 3 shows.
Figure 3. Lock wait controls available to applications in Db2 13.
6. Set the lock timeout per unit of work
-- Online path: fail fast and let the caller retry SET CURRENT LOCK TIMEOUT = 3; -- Month-end batch step that should wait its turn SET CURRENT LOCK TIMEOUT = 120; -- Back to the subsystem default (IRLMRWT) SET CURRENT LOCK TIMEOUT = NULL;
The special register needs Db2 13 function level 500 and a package at APPLCOMPAT V13R1M500 or higher. Values are in seconds. Zero means do not wait and -1 means wait without limit. The SPREG_LOCK_TIMEOUT_MAX subsystem parameter sets a ceiling on what an application may request. Agree that ceiling with the systems programmers before the first program ships with its own timeout, and confirm in the installation guide whether your level lets it change online. A timeout still surfaces as SQLCODE -911 or -913 with reason code 00C9008E, so existing retry logic keeps working.
7. Tell Db2 which side of a deadlock should survive
From Db2 13 FL 501 an application can weight itself in deadlock resolution. The built-in global variable accepts 0 to 255, and the thread with the higher value is less likely to be chosen as the victim. A long batch unit of work that is expensive to roll back is the usual candidate for a high value.
SET SYSIBMADM.DEADLOCK_RESOLUTION_PRIORITY = 200;
8. Use profile tables when the code cannot change
Purchased packages and frozen applications cannot issue new SET statements. Db2 13 lets system profiles set the special register and the global variable on their behalf, for local threads as well as DDF ones. FL 508 widened that control for local applications.
INSERT INTO SYSIBM.DSN_PROFILE_TABLE
(PROFILEID, AUTHID, PROFILE_ENABLED)
VALUES (5101, 'ORDBATCH', 'Y');
INSERT INTO SYSIBM.DSN_PROFILE_ATTRIBUTES
(PROFILEID, KEYWORDS, ATTRIBUTE1, ATTRIBUTE2)
VALUES (5101, 'SPECIAL_REGISTER',
'SET CURRENT LOCK TIMEOUT = 120', 2);
INSERT INTO SYSIBM.DSN_PROFILE_ATTRIBUTES
(PROFILEID, KEYWORDS, ATTRIBUTE1, ATTRIBUTE2)
VALUES (5101, 'GLOBAL_VARIABLE',
'SET SYSIBMADM.DEADLOCK_RESOLUTION_PRIORITY = 200', 2);
-START PROFILE -DISPLAY PROFILE
ATTRIBUTE2 controls whether a row applies to local threads, remote threads or both. Confirm the value and the permitted filter columns in the profile table reference for your function level before loading rows. Roll back by setting PROFILE_ENABLED to 'N' and issuing -START PROFILE again. To see who is holding everyone up, FL 508 extended the BLOCKING_THREADS table function and the -DISPLAY BLOCKERS command down to table and index level.
Object-level evidence an application team can read
9. Track synchronous reads and index splits per object
Until Db2 13 FL 509, attributing synchronous read I/O to one table space meant a trace or a monitor. Real-time statistics now carry an NSYNCREADIO column next to GETPAGES, for table spaces and for index spaces. The index split counters added at FL 501 sit in the same tables. For an application review this is the cheapest evidence there is, because it needs no trace at all.
-- Objects that pay for the most synchronous reads
SELECT DBNAME, NAME, PARTITION, GETPAGES, NSYNCREADIO
FROM SYSIBM.SYSTABLESPACESTATS
WHERE DBNAME = 'ORDDB01'
ORDER BY NSYNCREADIO DESC
FETCH FIRST 20 ROWS ONLY
WITH UR;
-- Indexes whose insert pattern keeps splitting leaf pages
SELECT CREATOR, NAME, PARTITION,
REORGTOTALSPLITS, REORGEXCSPLITS, REORGSPLITTIME
FROM SYSIBM.SYSINDEXSPACESTATS
WHERE DBNAME = 'ORDDB01'
AND REORGTOTALSPLITS > 0
ORDER BY REORGSPLITTIME DESC
FETCH FIRST 20 ROWS ONLY
WITH UR;
The counters are cumulative, so capture them on a schedule and compare the deltas. A table space whose synchronous reads climb faster than its getpages has lost sequential detection, buffer pool residency or clustering, and each of those leads to a different fix. Heavy split time on an index fed by ascending keys points at free space settings or key design. Our earlier post on Db2 13 index efficiency goes further into that case.
Data sharing groups get one more Db2 13 item at FL 509. A new lock hash algorithm reduces false page P-lock contention on very large page sets, above 64 GB DSSIZE at 4 KB pages or above 128 GB at 8 KB. Existing page sets pick it up only after REORG, REBUILD INDEX or LOAD REPLACE. If an insert-heavy application shows page P-lock waits in class 3, schedule the reorganization.
Taking a function level through to the packages
Activation is four separate steps with four different ways back. Treat them as one change and a rollback discussion becomes very confusing very quickly.
Figure 4. Taking a Db2 13 function level into production, with the way back at each step.
-ACTIVATE FUNCTION LEVEL (V13R1M510) TEST -ACTIVATE FUNCTION LEVEL (V13R1M510)
The TEST form changes nothing and reports readiness in message DSNU757I. Two details matter to application teams. Since Db2 13 FL 504, DDL can invalidate individual statements instead of the whole package, so one ALTER no longer forces an automatic rebind of every statement in a large program. And IBM's function level 510 page points to the DSNTIJPN job, which reports objects still in deprecated formats. IBM has stated that the remaining catalog and directory table spaces must be converted to universal table spaces before function level 511 can be activated, whenever that level ships. Run the report now. Finding a simple table space under a critical application is better done without a deadline.
Nine Db2 13 techniques on one page
| Technique | Needs | Evidence |
|---|---|---|
| 1. Inventory package levels | Any level | SYSIBM.SYSPACKAGE |
| 2. Two-pass rebind | FL 100 | APCOMPARE messages, PLAN_TABLE |
| 3. Check predicate stage | Any level | DSN_PREDICAT_TABLE.STAGE |
| 4. Re-explain large IN-lists | FL 506 | RIGHT_HAND_SIDE = 'INDEXED_VALUE' |
| 5. Move rows in sets | FL 506 for multi-row VALUES | SQL call count and class 2 CPU |
| 6. Lock timeout per unit of work | FL 500 | Timeout counts, class 3 lock wait |
| 7. Deadlock priority | FL 501 | Deadlock victims by plan |
| 8. Profile tables | FL 500, wider at FL 508 | -DISPLAY PROFILE |
| 9. Object-level read I/O and splits | FL 501 and FL 509 | Real-time statistics tables |
What this post does not show
Nothing above was benchmarked by us on z/OS hardware, and we would rather say so than dress up a guess. The samples use invented object names and follow Db2 13 syntax as IBM documents it through FL 510. Verify profile table values, subsystem parameter behaviour and catalog columns against the documentation for your exact level. Access path changes after a rebind are workload-specific, and data sharing adds effects a single subsystem test will never show.
Db2 13 application performance work pays best when developers, DBAs and systems programmers look at the same accounting data in the same room. MinervaDB provides Db2 for z/OS and LUW consulting, application and SQL reviews, and 24x7 consultative support alongside your own team and IBM support. If a rebind campaign or a Db2 13 function level activation is on your plan, talk to our Db2 engineers first. As with every recommendation we publish: test in a non-production environment before applying anything here to production, and keep your recovery procedures rehearsed.
Running this in production?
MinervaDB provides IBM Db2 Consulting with 24x7 coverage and a 15-minute S1 response. Talk to an engineer.