Previous topic  Top  Next topic  Print this Topic
 

ShrinkDBAccess (Rewriter for External Database Access)

 

This rewriter processes dbaccessuser literals. It determines the columns that should be selected from a database and adds the list of these columns to dbaccessuser. So only the columns that are needed for the query will be selected from a database and the number of database queries will be reduced.

Example

?- _dbaccessuser("projects","F"("id",?VAR1,"project",?VAR2),"conndatasource").

will be rewritten to

?- _xdbaccessuser("projects","F"("id",?VAR1,"project",?VAR2),"conndatasource",["ID","PROJECT","CUSTOMER"]).

By execution of the first xdbaccessuser all three columns will be selected and cached, so by the second xdbaccessuser no columns should be selected from a database.