ORDA QUERY CHAINING (Is chaining performed on client or server?)

Given the following statement:

$result:=(ds.table.query(“attribute = :1”;$find).length>0)

Question:

Is the right side (of the given statement above) executed on the server and the boolean result sent to the client?

Or is the query result sent to the client and then the boolean result calculated?

The boolean is always calculated on the client.

If you use v17.x, the server will send the first 40 entities (all fields) to the client - and the info about the size of the total result.

If you use v17 R5 or newer, the server will only end the size of the result and an ID, other data is requested when needed. See https://blog.4d.com/use-orda-to-boost-performance-in-client-server-mode/ for details.

To get a better understanding which command is sending how many packets or how many bytes, requests logs helps as well: https://blog.4d.com/optimize-your-orda-code-with-requests-logging/