|
Archives of the TeradataForumMessage Posted: Mon, 20 Oct 2003 @ 18:28:24 GMT
With a Cobol PP2 app you are using a single session to execute the select statements serially. If each one took 1/10 second it would take your job 42 hours to run. (With DB2 you are simply reading a 'local' disk - with Teradata you are executing a command on a different system, across a network conection... that will always be slower.) Since you say this is a 'small table' why not load the key value that you are checking into an array. Then use a binary search (or even an optimized sequential search) to determine if the value is in the array. This will be very fast (faster than DB2 in fact.) If these provider numbers are not too sparse (ie. most - at least 20% - exist within their domain range) you could make it really fast by using the provider number as the index to the array - which would simply contain a 'True/False' value to say whether it was valid. Any of these methods requires you to issue a single Select to populate the array - with sorted values. Mike Dempsey
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||