It's all about speed. Say you have a table that has indexes and you ask for a set of records: SELECT field1, field2, field2 FROM table where field1="X"
If you have an index on field1, there is no difference (let's ignore DELETED(), ANSI and EXACT for simplification) from: SELECT 0 USE table AGAIN alias Result NOUPDATE SET FIELDS TO Field1, field2, field3 SET FILTER TO field1="X" A filtered view into an existing table by using it AGAIN in a separate work area is fundamentally the same cursor (CURrent Set Of Records) as re-reading the table from disk, selecting out the fields you want, filtering on those you want, and producing some temporary files to hold the results. Except the "filtered view into the already open table" is practically instantaneous; you're just sharing cached results, rather than executing a bunch of redundant I/O, at slow disk speeds. On Wed, Jan 6, 2016 at 4:07 AM, Paul Newton <[email protected]> wrote: > Ted > > Interestingly if I issue > USE DBF('tmpctran') AGAIN ALIAS TEST > > Then DBF('tmpctran') and DBF('test') return the same value ... so I have two > cursors with, supposedly, the same DBF() > > Paul > > -----Original Message----- > From: ProfoxTech [mailto:[email protected]] On Behalf Of Ted Roche > Sent: 05 January 2016 19:47 > To: [email protected] > Subject: Re: Odd/inconsistent behaviour of DBF() > > On Tue, Jan 5, 2016 at 11:35 AM, Paul Newton <[email protected]> > wrote: >> Richard >> >> I used the NOFILTER clause and a physical file was NOT created ... >> >> Paul >> > > I believe that FoxPro aggressively caches both reads AND WRITES so the TMP > file is probably not created unless it has to be. A small DBF takes little > space in RAM and can be accessed in nanoseconds, while a file written to and > then read from takes takes milliseconds. If you USE the file and then go look > for it, is it flushed to disk at that point? > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CACW6n4s1YjKWDy_SfyLA8fUw4fuWAvs=e7vzxtrlbo96ta_...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

