Database Engines:ads

Local versus remote index files Professional

Local versus remote index files

Although the ADSDBE has a built-in order component for index handling the ADS, it can be combined with another Xbase++ order DBE, such as the NTXDBE or CDXDBE. This is acomplished with the DbeBuild() function which creates a compound DBE that uses the data component of the ADSDBE and an additional order component, the NTXDBE, for example:

DbeLoad ( "ADSDBE" ) 
DbeLoad ( "NTXDBE" ) 
DbeBuild( "ADSNTX", "ADSDBE", "NTXDBE", ,"ADSDBE" ) 

oSession := DacSession():new( "DBE=ADSNTX;SERVER=\\ALASKA\VOL1" ) 

USE F:\DATA\Customer EXCLUSIVE VIA "ADSNTX" 
INDEX ON Upper( Lastname+Firstname ) TAG Name TO C:\LOCAL\Cust 

The result of this code would be that the Customer database file is managed by the ADS on the server (F: drive), while the index file is created on a local drive of the client station (C: drive).

This technique should be considered when index files are created temporarily over the course of database queries. Dramatic performance gains can be expected in this case, since the server is free up from a lot of computational work plus no additional network overhead is needed to perform client/server operations.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.