IBM® InfoSphere® Optim™

What Is Test Data Subsetting? A Practical Guide

November 10, 2026
What Is Test Data Subsetting? A Practical Guide

Development, QA and UAT teams need realistic data to do their jobs. But copying full production databases into every lower environment is slow, expensive and risky: refreshes take days, storage costs multiply, and every copy is another place sensitive data can leak. Test data subsetting is the approach most enterprise teams reach for first.

What is test data subsetting?

Test data subsetting extracts a smaller, referentially intact slice of production data and loads it into a non-production environment. For example, instead of copying an entire insurance database, you might take 5% of policyholders along with every policy, billing record and claim that belongs to them.

The key word is referentially intact. A random sample of rows from each table produces orphans: orders without customers, claims without policies, and application screens that fail to load. A good subset starts from a chosen set of records and follows the relationships between tables, so every record arrives with the related records the application needs.

Why subset instead of cloning production?

  • Smaller environments. Less storage and infrastructure for every dev, test and training copy.
  • Faster refreshes. Smaller data sets load in a fraction of the time, so teams can refresh more often and test against current data.
  • Targeted test data. Select exactly the scenarios QA needs, such as a product line, a region or accounts in a particular state, rather than wading through everything.
  • Less sensitive data exposed. Fewer records leave production, and the ones that do can be masked on the way out.

How subsetting works

  1. Map the data model. Identify the relationships between tables, including the ones that are not defined in the database. Many applications, especially older ones, enforce relationships in application code rather than with database constraints.
  2. Choose a starting point and criteria. Pick the driving table (customers, policies, accounts) and the rules for selecting records, such as a percentage, a date range or specific business conditions.
  3. Follow the relationships. Pull every related parent and child row so the subset is complete and consistent.
  4. Mask sensitive data. Replace personal and regulated values with realistic substitutes as the data is extracted, applied consistently so joins and lookups still work.
  5. Load and validate. Check row counts, look for orphaned records, scan for residual sensitive data and confirm the application starts and runs.

Common pitfalls

  • Missing relationships. If application-defined relationships are not captured, the subset will contain orphans and broken screens.
  • Over-pulling. Reference tables and highly connected “hub” records can drag most of the database into a subset unless traversal rules are set carefully.
  • Mixed platforms. A single business process may span Db2 for z/OS, VSAM files and distributed databases. The subset has to stay consistent across all of them.
  • Inconsistent masking. If the same customer is masked differently in two systems, cross-system tests fail.
  • One-off scripts. Hand-built extracts work once, then break when the schema changes. Subsetting should be repeatable and parameterized.

Subsetting, masking and synthetic data

These approaches work best together. Subsetting reduces volume. Masking removes sensitive values while keeping data realistic. Synthetic data fills gaps where production data does not exist, such as a new product or an edge case that has never occurred. For a deeper comparison of masked production data and synthetic data, see our whitepaper, Modern Test Data Strategies in Financial Services.

Tools and expertise

IBM Optim Test Data Management, in both its InfoSphere and NextGen editions, provides relationship-aware subsetting across distributed and mainframe data sources, and works with Optim Data Privacy for masking. ABMartin has been an IBM Partner for Optim since 2012, with 250+ implementations behind us. We help teams design subsetting rules, capture the relationships their applications rely on, and build refresh processes they can run on their own.

Getting started checklist

  • List the applications and environments that need test data, and how often they refresh.
  • Identify the data sources behind each application, including mainframe files.
  • Agree on the business scenarios testers need covered.
  • Classify the sensitive data that must be masked.
  • Decide how you will validate each refresh before release.

Planning a test data refresh or modernizing an Optim environment? Let’s talk.

Share:

Get data privacy news direct to your inbox

Stay up to date with the latest news on data privacy and data masking from ABMartin.
Thank you for subscribing to the ABMartin newsletter.
Oops! Something went wrong while submitting the form.