How the SQL query runs in background?

I need to understand how the flow of data is when any query function is triggered from the client screen. Can anyone please confirm/correct below understanding?

When a query function (e.g. system.db.runQuery(“SELECT * FROM TEST”)) is triggered from the client screen; on button click or from table component, gateway connects to the database using configured database connection and then shares the result with the client which had triggered the query. So the gateway server resources are consumed for fetching requested data from DB and gateway knows which client had requested the data which is shared with client over http protocol. More the queries, more is the load on gateway than on client.

1 Like

Correct. Query operations in Vision clients and in the designer use RPC to have the gateway make the query, and the results are returned via the RPC response. With one caveat: Named queries have a cache in the gateway, though, so many clients making the same query close in time will get a response from that cache. (Operation of that cache is opaque…)

1 Like

Thank you @pturmel for your reply.