Get started Bring yourself up to speed with our introductory content.

Query separate master files

Our system is designed to separate campgrounds into individual iSeries libraries. Each library contains the same files with the same file structures. While each library contain several files, only three have a significant number of records. Depending on the number of transactions the campground does and how long they've used our system, the three files can be in excess of 1,000,000 records.

Our challenge is querying the separate master files in each library for statistical reports and analysis. We would love to combine all files into one library since the campground number is a key to each record in each file so we already have unique keys.

Our concern is performance. We are on V5R1, moving soon to V5R2, on our 730.

Would our applications suffer if we combined all files into one file in one library where the number of records could easily exceed 500,000,000?

I have to start off with the answer of "it depends". If your application heavily utilizes keyed access paths to retrieve the data (very few arrival sequence/table scans), then the application should adjust pretty well to the large one file approach.

Your Report Environment performance will depend on how sound your indexing strategy is. Do you have the right set of keyed logical files & indexes in place, so that only a small percentage of the reports use a table scan or create a temporary index? There's a good Indexing Strategy paper on the DB2 UDB for iSeries.

With the large file sizes, you may get some benefit from Encoded Vector Indexes (EVIs) - especially on V5R2, where the maintenance issues with EVI's have been solved. The Indexing Strategy paper also discusses how EVI's can improve the performance of queries and reports.


Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: tips, tutorials and more.

Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries.

Dig Deeper on iSeries SQL commands and statements

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.