On 03-Sep-2015 14:14 -0600, Booth Martin wrote:
I am fairly new with SQL so please excuse what are most likely very
I am looking to understand the pros and cons with SQL. On large
files with data that will be used in various applications and in
various sort-by schemes, are logical files a help?
Keyed logical files [for which a Keyed Access Path is created] can
be helpful, but mostly they are helpful for selection [WHERE clause
predicates] and joins [JOIN predicates] more so than for ordering
[ORDER BY], because often actual /sorting/ is more efficient than
utilizing the key [per /random/ I\O] because a subset of selected
row data often can be accessed as /pages/ of effectively contiguous
If so, does one reference the physical file and then SQL finds the
best logical, or does it help to specify a specific logical file?
The SQL is effectively restricted to operating on the physical and
using optimization for choosing a compatible keyed and\or selective
Access Path; i.e. the Logical Files with the SQL attribute are
disallowed for a table-reference, and depending on what level of SQL
support, only the Classic Query Engine (CQE) knows what to do with a
table-reference that includes a DDS LF. <<SNIP>>
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.