What is the difference between Access path and Open data path?
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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.
Dig Deeper on DB2 UDB (universal databases)
Related Q&A from Kent Milligan
Create a host variable of the where in statement on the fly with dynamic SQL.continue reading
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ...continue reading
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.