... portions of ADS documentation of AdsGetKeyNum : If the index is large, this function could take some time to complete because index keys are literally counted until the current key is reached. If usFilterOption contains ADS_RESPECTFILTERS, the Advantage Client Engine must skip through all ...