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 INFORMATION 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