VIAINDEX usage

Roughsedge, Greg N Greg.N.Roughsedge@team.telstra.com
Mon, 17 Feb 2003 16:41:20 +1000


Hi,

I would like some clarification around the use of the VIAINDEX clause.

Background:
Op Sys:        Open VMS V7.1-2
Database:      Oracle RDB 7.0-6
Powerhouse:  7.10.G1

I've used the CHOOSE VIAINDEX <indexname> clause and then assumed that I can use the SORTED clause as the records have been retrieved via the named index.
The DBA's believe there is no way to force the retrieval via a specified index as the database will determine the most appropriate index and use this regardless of what's specified.

This equally relates to the LINK VIAINDEX clause as well as part of the ACCESS statement.

My question is, can I be absolutely guaranteed that the VIAINDEX option will retrieve records using that index (and consequently know the sequence of records retrieved). Or, should I not specify the VIAINDEX option and use SORT instead of SORTED.

Cheers 

Greg Roughsedge
Media Solutions - Telstra
(Black Diamond Technologies)
(03) 8696 5968