When the solution matters

Tips...

4D v11 SQL (Current Version)4D 2004 Solution Accelerators Academic Downloads

4D v11 SQL


Query by Formula - Client/Server

 

In 4D 2004, a Query by Formula is executed on the client end. This means that every record must pass over the network to have a formula applied, and to determine if it will be part of the selection. 

When the logic of the request allows it, 4D v11 SQL will perform queries directly on the server to avoid extraneous loads on the network. Only the selection is returned to the client end, as with a classic query.

Let’s go back to the formula for measuring distance used in the test QUERY BY FORMULA (standalone).

 

QUERY BY FORMULA(distance($latitudeRef;$longitude;[customer]latitude;
      [customer]longitude)<10)

 

Under 4D 2004, the query is executed in 8.6 seconds.

Now, under 4D v11 SQL, this query executes in .7 seconds.

It’s a 12-fold improvement, subject to variables such as the number of records in the table, as well as network speed, latency, etc.

The use of fields or variables doesn't pose any problems, and methods can be used inside the formula. It is then necessary to pass all the variables used in the calculation in a parameter, so that 4D Client can send 4D Server the elements necessary for execution.

NOTE: In the case of an older databases converted to 4D v11 SQL, this optimization must be authorized in the Compatibility section of the preferences.

International | Company | Contact 4D | Site Map | Privacy Policy | © 4D UK 1995-2008 | Change font size: [A] [A] [A] | Print this page