Newsletters   Subscriptions  Forums  Store  Media Kit  About Us  Contact  Search   Home 
fhg
Volume 4, Number 22 -- June 30, 2004

Eliminate Unnecessary Access Paths


Hey, Ted:


One could make the case that computing is of two types: CPU- and I/O-intensive. An example of the former is the generation of graphics for a movie. An example of the latter is information technology. This means that iSeries shops looking to improve performance should concentrate on reducing the amount of I/O that must take place.

Think about what happens when a record is added to, deleted from, or changed in a physical file. The database manager must examine every access path built over the file and adjust any that are affected by changes to the file. The more access paths a file has over it, the longer the examination and adjustment process takes, and the slower the application runs.

One way to improve performance is to reduce the number of access paths over a physical file. DB2 UDB automatically shares access paths where possible. When a logical file is created, the database manager examines the access paths to see if a similar path already exists. A similar access path has the same major key fields, select/omit criteria, and so on. The V5R2 database programming manual explains the criteria that must be met for similarity. If a similar access path exists, DB2 attaches the existing access path to the new file. If a compatible access path is not found, DB2 creates a new access path.

For this reason, the order in which access paths are created is important. Assume two logical files, A and B. A is keyed on department and employee number. B is keyed on department, employee number, and transaction date. If A is created first, DB2 will create two access paths. If B is created first, DB2 creates only one.

The Display File Description (DSPFD) and Display Database Relations (DSPDBR) commands provide only a slight bit of information about shared access paths. If there is an API or a CL command that provides access path information in a concise format, I am not aware of it. But such a utility would be helpful, in that it would show us which access paths could be shared and help us to create them in the proper order. Another good utility would be one that deletes all logical files and sequences their rebuilding in such a way that access paths can be shared.

OS/400 includes a feature similar to the second proposed utility. When a physical file and its logical files are saved and restored, the iSeries rebuilds the logical files in descending order by number of key fields. In the example given above, file B, which has three key fields, would be restored before file A, which has only two key fields. The result is that a save and restore process may reduce the number of access paths over a physical file.

Anyone who undertakes this procedure should be absolutely sure, of course, that the backup is complete and reliable, so that the data can be safely restored. It would be good to take additional precautions, such as creating a separate copy of the physical file in another library and verifying that it is complete as well.

--Dominic Lefevre

Sponsored By
GUILD COMPANIES

Do you really need a good reason to expand your iSeries skill set?

Here are two facts to remember:

1. Training increases productivity.

2. Order now and save up to 30% on
a single-user license to Manta Combination Packs of training courses.

Now is the Time to Increase Your iSeries Knowledge!

There are 98 iSeries-specific courses and exams in the Manta Combination Packs that cover a wide range of skills, including:

Programming
System Administration
Operations
Client Access Express

Get up to 30% off on all Manta Combination Packs NOW!

PLUS, Manta is giving full credit for courses within a Combo Pack purchased since July 2003, and 50% credit for courses purchased between July 2002 and July 2003--good toward the puchase of a full Combo Pack. Contact us at 212-942-5818 for details.

Act Fast - Offer Ends July 15

More details at http://store.itjstore.com/macopa.html.


Editors: Howard Arner, Joe Hertvik, Ted Holt,
Shannon O'Donnell, Kevin Vandever
Managing Editor: Shannon Pastore
Contributing Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.


THIS ISSUE
SPONSORED BY:

T.L. Ashford
NetIQ
Guild Companies


BACK ISSUES

TABLE OF
CONTENTS
V5R3 SQL Enhancements

Secure Spool File Management

Eliminate Unnecessary Access Paths


The Four Hundred
The eServer i5 Versus Unix Servers

Leasing Greases IT Acquisitions, Pumps the Economy

Prepare for Wrenching IT Personnel Changes Now

Four Hundred Stuff
Great Plains Communications Finds Comfort in iTera

Metafile Debuts New WebSphere Portlet for COLD Suite

Linoma Boosts Security Automation with OS/400 Data Transfer Tool

Four Hundred Monitor


Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, 50 Park Terrace East, Suite 8F, New York, NY 10034
Privacy Statement