Rules Engine SQL Optimization

Previous Next

When SQL statements are executed within a USoft application, these statements are processed at Rules Engine level and, if needed, also at database level.

First, the SQL statement (e.g. the constraint text) is submitted to the Rules Engine. This SQL could be termed "Rules Engine SQL". The Rules Engine processes this SQL statement and attempts to execute it using information that is already available on the client computer.

If it turns out that server data is required, the Rules Engine proceeds to build a SQL statement to be processed by the RDBMS. This could be termed RDBMS SQL.

In USoft BenchMark, in the Test Profiles window, the SQL Statements tab page shows both Rules Engine SQL and RDBMS SQL:

· Rules Engine SQL is shown in the SQL Statement field.

 

· RDBMS SQL is shown in the RDBMS SQL Statement field.

You can also view RDBMS SQL statements if you use BenchMark's Tracer facility.

Once received by the RDBMS, a second optimization round takes place as a standard RDBMS procedure. This optimization is, of course, not Rules Engine specific but it is specific to the database you use.

As a general rule, the Rules Engine optimizes SQL statements by maximizing local evaluation. If the statement requires data that is already known on the client, then no RDBMS SQL statements need to be produced, and nothing is sent to the server. If statements are sent to the server, attempts are made to keep processing down to a minimum.

Rules Engine SQL Optimization

Related Topics

Row Binding

Local Values

Update Change Check

Resolving Void Conditions

Local SQL Functions

Set Oriented Manipulations

Large Numbers

No Childless Parent Cascade