The query builder in EG generates SQL that is designed to have a very good chance of passing through to the back end database for processing. It relies on "implicit passthrough", a feature of the SAS/ACCESS database library engines. The implicit passthrough layer optimizes the query for the particular target database, translating the SQL to the dialect that the database would best understand and process.
That said, there are a few operations that can prevent efficient processing with implicit passthrough:
* use of SAS-specific functions within filter expressions (for example STNAME), because the database has no functional equivalent.
* joins of tables where at least one table resides in SAS instead of the database. One remedy: upload the SAS table to the database first. Or if the table is small, simply use the values from the table as literals within the query instead of performing the join.
All of this is designed to optimize the result set brought back from the database into your SAS session. When using SQL, the entire content of the table is never brought back all the way to the EG client machine. EG reads only enough records from the table to display them in the data grid (so, about 40 records at a time)
Chris