>>I am importing data and need to validate that a certain
>>field contains valid codes.
>>
>>It is my understanding via experiments that SET RELATION
>>is inherently faster than performing a SEEK(). The data
>>is sorted based on another key so the code I am evaluating
>>comes in a non-sorted order.
>>
>>After APPENDing the data to a new cursor and indexing
>>the cursor (again NOT on the code field) I do a
>>SET RELATION TO code INTO codelookuptable ADDITIVE
>>
>>After that I do a GO TOP in the parent (imported data)
>>table. Is the GO TOP required to kick the relation in
>>gear. I had a problem on a long process that gave me
>>an error message stating that one of the valid codes was
>>in error.
>>
>>Should I do a GO BOTTOM then a GO TOP prior to SCAN ...ENDSCAN
>>on the parent table?
>>
>>Not sure why I have trouble with set relation....
>
>Actually, SET RELATION is slower than SEEK() and better be avoided. It's mostly because using SEEK() you really know where you make mistakes (if any), and using SET RELATION you have to guess what is wrong.
While I would agree that SET RELATION is not as straight forward
as a SEEK(), there is NO question that SET RELATION is considerably
faster when dealing with large tables. That is why I am putting
up with SET RELATION...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement