Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!usc!elroy.jpl.nasa.gov!jato!herron.uucp!jbrown From: jbrown@herron.uucp (Jordan Brown) Newsgroups: comp.databases Subject: Re: Avoiding SET FILTER TO command Message-ID: <104@herron.uucp> Date: 31 Jul 89 02:27:32 GMT References: <9636@phoenix.Princeton.EDU> <472@uncmed.med.unc.edu> Reply-To: jbrown@jato.jpl.nasa.gov Lines: 21 In article <9636@phoenix.Princeton.EDU>, englandr@phoenix.Princeton.EDU (Scott Englander) writes: > Let's say you want the record where field1 = x and field2 = y, where x > and y are expressions appropriate to the respective field type. Then > all you need to do is > > LOCATE FOR field1 = x .and. field2 = y > > This might still take a while, but should be faster than SET FILTER TO. > Hope this helps. It shouldn't be any faster. It should be exactly the same speed. The real answer is to index on the pair of fields and seek on the concatenation. index on last+first to lf seek "Brown Jordan" if you don't have an such an index and don't want to maintain it, oh well, you're going to do a linear search. This won't be fun using either SET FILTER or LOCATE.