KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: QUERY BY FORMULA and its Execution Location
PRODUCT: 4D | VERSION: 15.1 | PLATFORM: Mac & Win
Published On: February 3, 2016

The QUERY BY FORMULA and QUERY SELECTION BY FORMULA commands can influence the performance of the application and also its design depending on where it is executed from.

This setting can be set by using the SET DATABASE PARAMETER command with the Query by formula on server (46) selector and the followign values:

  • 0: databases default configuration
  • 1: execute on client
  • 2: execute on server
For the 0 selector, databases created with 4Dv11 SQL until v15 the default setting is set to execute on server while databases created with older ones will execute on the client. Older databases will also have this option as a compatibility setting in the database settings.

Not all queries executed by this command will be ran on the server is it is set to do so, if a variable contains a pointer then it is executed where the query was called.