The source of the data queried in a data-binding expression determines whether the query expression is executed in the cloud, in the browser, or if parts of the query expression are executed in one context, and other parts in the other.
The compiler automatically determines if the query expression will run on the server, in the browser, or if the execution context needs to be switched while running a query. A basic consideration is that server calls should be minimized: if a query can entirely be run in the browser, no request will be made to the server.
The execution context of a query expression matters not only for performance considerations, but because certain data sources and certain operations can only be accessed in one context, but not the other: