Q

Difference between Access path and Open data path

What is the difference between Access path and Open data path?

Open Data Paths (ODPs) provide a way for more than one program in the same job to share the same file status information (I/O feedback areas), file pointer positions, and storage area. ODP's are quite useful as they can improve performance, reduce the amount of main storage needed by the job, and reduces file opens/closes.

For native I/O access you can set up ODP's by specifying SHARE(*YES) on the CRTPF, CHGPF, or OVRDBF commands. However, SQL based I/O access is not influenced by the SHARE (*YES) setting. The DB2 SQL engine is solely responsible for creating and reusing ODP's for I/O performed from SQL-based interfaces (and does so automatically).

An access path (also known as a keyed logical file or an index in SQL terms) is data structure that represents the order in which data will be retrieved from a file. It provides a quick way of locating data. Without an access path, a program would be forced to read every row in the table to find the particular rows of interest. This technique (known as a full table scan), can be a lengthy process, depending on the size of the table and how many rows are being retrieved. A scan using an access path tends to be more efficient than a full table scan when a small percentage of rows are selected since the length of the access path key value is usually shorter than the length of the table row.

More on this topic

Visit the ITKnowledge Exchange and get answers to your DB2 questions fast.

Check out this Search400.com Featured Topic: Expert advice on DB2 

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

The Best Web Links: Tips, tutorials and more. 

 

This was first published in March 2005

Dig deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchEnterpriseLinux

SearchDataCenter

Close