|
Use the index directly when using traditional RPG I/O. Use the Table or
View when referencing with SQL.
By the way, you'll need to add a record format to the Index to make it
usable by RPG.
Here is an example from our source library:
CREATE INDEX EIXQL01 ON EIXQ (ECUST ASC, EPART ASC)
RCDFMT EIXQR;
LABEL ON INDEX EIXQL01 IS 'EIXQ by Cust, Part';
One of my co-workers insists on using the SQL indexes we've built aslist
if they are tables and reading them directly.
I've been trying to convince him that indexes are intended ONLY to
boost performance on table & view access and that, if he wants to read
a table in a specific key order, he should build a keyed view over the
table.
Unfortunately, he won't budge on this ... I'd like to present him with
some IBM documentation explaining indexes are for performance purposes
only and that they shouldn't be read directly.
I've shown him that you will get a SQL7011 error if you try to read an
index using a select statement, but he thinks it's fine to read the
index using native RPG I/O because the index is implemented as a
logical file.
Can anyone point me to an IBM document (preferably on ibm.com) that
explains that indexes are for performance purposes only?
Thanks!
Rob M
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxquestions.
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.