Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!dev!dgis!jkrueger From: jkrueger@dgis.dtic.dla.mil (Jon) Newsgroups: comp.databases Subject: Re: Ingres Endretrieve problems Keywords: UTS, KnReqLock, RTI no help Message-ID: <832@dgis.dtic.dla.mil> Date: 9 Apr 90 19:10:56 GMT References: <5394@drutx.ATT.COM> Distribution: comp Organization: Defense Technical Information Center (DTIC), Alexandria VA Lines: 25 rlp@drutx.ATT.COM (Bob Prehn (@ The Right Choice)) writes: >We have a number of situations that have only one match for a given search >and we want to terminate the search. (Some instances of having many allowable >values and we only want the first one.) [and INGRES's ENDRETRIEVE isn't] ... >The work-around is to not use the >endretrieve and suffer the performance penalty. [or is there another way] You call yourselves The Right Choice. But your database programming consists of taking the first choice. See any inconsistency there? How about qualifying the thing you're looking for to singleton select? Worse case is the max or min of a type, performance will be no worse than fetching all and throwing all but one out. Best case is finding a natural range that uniquely identifies an acceptable row. Of course, there are reasons why this might be difficult, in which case ENDRETRIEVE is the right tool. I wish I could help you there, but we've never seen it fail. Can the problem be replicated? -- Jon -- Jonathan Krueger jkrueger@dtic.dla.mil uunet!dgis!jkrueger Drop in next time you're in the tri-planet area!