On Thu, Jul 10, 2014 at 8:25 AM, Rafael Copquin <[email protected]> wrote:
> In both cases, you open the table. Now, does the select statement operate > on the server or it must bring the data to the local machine and then run > the sql command? In the last case it would be slower the bigger is the > quantity of records in the table. > The FoxPro executable runs on the local workstation. Nothing Fox runs on the server. The server is a file server, simply serving file requests from the FoxPro application. It knows nothing of SQL or DBFs, only responding to requests to read or write, create or lock files. Now, FoxPro knows this, and is very clever about reading only what it needs to read from each file it opens. It reads the DBF header, it reads the index definitions in their headers. In the case of SQL SELECT, it parses the SQL clauses and attempts to match up the phrases in the SQL (especially the JOIN and WHERE) with matching phrases in the index definitions. It can then read the applicable portions of the indexes to optimize which table records it needs to read. Finally, it reads the actual data from the DBF. DELETED() is an exceptional case. Usually, but not always, it is helpful to have an index on every table for DELETED(), so that FoxPro does not need to read all of the records to determine if they are deleted and should be excluded from the final result set. However, you must always, Always, ALWAYS test the theories of how Rushmore (tm) works with the reality of how your application, your network speed, latency and load, and your file server speeds work together. -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ 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/CACW6n4vfxzg9XL=ysaorrxgn0b+jqbf1koo_gakowvmh+ql...@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.

