Rebuilding a Nightly Settlement Batch Before It Ran Out of Window
Case Study · Oracle Development

Rebuilding a Nightly Settlement Batch Before It Ran Out of Window

A financial services firm's overnight settlement processing was creeping closer to market-open every quarter. PL/SQL orchestration rework and partition-aware parallelism restored headroom in the batch window without changing the settlement logic's outcome.

Financial Services Batch Orchestration Partitioning Strategy PL/SQL Rewrite
12 Weeks
Engagement duration
~3x
Estimated batch throughput gain
340+
Stored procedures reviewed
The Challenge

A Batch Window Shrinking Every Reporting Cycle

The client, a mid-market financial services firm, ran its nightly trade settlement processing as a large, sequential PL/SQL batch against a growing Oracle schema. Each quarter's volume growth pushed the run further toward market-open, with progressively less slack for retries or manual intervention.

Architecture

A Batch Built for a Smaller Data Volume

The settlement batch had originally been designed as a mostly sequential process. As transaction volumes grew year over year, the batch's runtime grew with it — with no parallelism built into the original design to absorb that growth.

Schema Debt

Cartesian-Join Patterns in Legacy Procedures

A number of the older stored procedures relied on join patterns that had gone unnoticed at lower data volumes but produced unnecessary cartesian-style row explosions once the underlying tables grew significantly larger.

Compliance Risk

Zero Tolerance for a Late Settlement Run

A batch that spilled past its window risked delaying settlement confirmations into market-open — a compliance-sensitive outcome the firm needed eliminated entirely, not just made less likely.

The Approach

Parallelise What's Independent, Rewrite What's Not

The batch was decomposed into its logical settlement legs before any code was touched, so parallelisation decisions were based on actual data dependencies rather than the batch's existing script order.

AWR-Based Batch Profiling

AWR snapshots across several full batch runs identified which settlement legs consumed the most elapsed time and which were CPU-bound versus I/O-bound — informing where parallelism would actually help.

Dependency Mapping Across Settlement Legs

Settlement legs were mapped for true data dependencies versus historical execution order, surfacing legs that could safely run concurrently without affecting settlement outcomes.

Stored Procedure Review & Refactor

Over 340 stored procedures were reviewed; join logic responsible for cartesian-style row explosions was corrected, and row-by-row cursors were replaced with bulk, set-based operations where safe to do so.

Partition Pruning & Table Partitioning

Key transaction tables were range-partitioned by settlement date, enabling partition pruning that dramatically cut the data scanned per run and allowed independent legs to operate on isolated partitions in parallel.

Parallel Orchestration & Shadow Runs

The rebuilt batch ran in shadow alongside the legacy process across multiple full cycles, with settlement outputs reconciled row-for-row before the new orchestration was promoted to be the system of record.

An Estimated 3x Batch Throughput Gain Partition-aware parallelism across independent settlement legs typically cut total elapsed batch time to roughly a third of the prior baseline, restoring meaningful headroom before market-open.
Cartesian-Join Patterns Eliminated Corrected join logic in the legacy stored procedures removed unnecessary row-explosion patterns that had been silently inflating both runtime and resource consumption.
Reconciled Output, Zero Settlement Discrepancies Row-for-row reconciliation across multiple shadow runs confirmed the rebuilt batch produced identical settlement outcomes to the legacy process before cutover.
Headroom for Future Volume Growth Partitioning by settlement date gives the batch a scaling path for continued transaction growth, rather than requiring another emergency rework at the next volume threshold.
The Impact

A Batch Window With Room to Grow Again

  • Overnight settlement batch restored to comfortably finish inside its processing window
  • Independent settlement legs re-architected to run in parallel where data dependencies allowed
  • 340+ stored procedures reviewed, with cartesian-join patterns corrected
  • Key transaction tables range-partitioned by settlement date for pruning and scale
  • Row-for-row shadow-run reconciliation completed before cutover, with no discrepancies
  • Scaling path documented ahead of the firm's next projected volume increase
"The batch had been creeping toward market-open for two years and everyone assumed the fix was more hardware. It wasn't — it was the join logic and the fact that nothing ran in parallel that didn't have to be sequential." — OptiSol Oracle Engineering Lead

Let's Talk

Start a Conversation

Tell us what you are running today and where you need expert support.

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Free initial consultation Confidential assessment solutions@optisolbusiness.com

Global Presence

Where We Operate

Five global locations. One connected engineering team.

New York skyline representing the United States office
HQ

United States

North America

India landmark representing the delivery centre
Delivery Hub

India

Chennai · Coimbatore

London skyline representing the United Kingdom office
Europe

United Kingdom

Client services

Australian coastline representing the Australia office
APAC

Australia

Regional operations

Dubai skyline representing the UAE office
Middle East

UAE

Client services