If you have up to date statistics for your network DBs (UPDATE
STATISTICS FOR SCHEMA schema) and IDMS considers that the fastest way to
get that record or records is to go through S-999-783 to get it, then it
will. If IDMS considers that an area sweep will be faster then it will
do that.
Your statement in SQL is simply
SELECT * FROM FSPR-VAFVAST WHERE VAF-RNR = 210002735
You can fool IDMS if you think it is taking the wrong decision using the
OPTIMIZE FOR n ROWS clause. If you say OPTIMIZE FOR 1 ROWS then it will
almost certainly go for the index. If you say OPTIMIZE FOR 999999 ROWS
then it will probably go for the Area sweep.
You could also do an Explain on the SQL to see what IDMS is actually
going to do. The example to do it is in the DISTSRC library.
BROWSE CAI.GJR170.DISTSRC(EXPLDDL) Line 00000000 Col
001 080 .
Command ===> Scroll
===> CSR .
********************************* Top of Data
********************************** .
------------------------------------------------------------------------
.
--CONTAINS PTF#r17 Support full outer join sort/merge DEFJE01 06/08/21-
.
--CONTAINS PTF#IDMS/3170 PERCA02 05/16/05-
.
--CONTAINS PTF#IDMS/3096 RHORI01 12/10/04-
.
-- -
.
-- The following SQL definitions can be very helpful when using the -
.
-- EXPLAIN command. -
.