You can use query groups to ensure that related queries execute against the same database connection. Query groups allow you to use the results of one query in another query. For example, the first query creates a temporary table that the second query uses. If you do not use query groups, connections are pooled and might not be executed against the same connection.
Query groups apply to both worlds in QMF Visionary Studio and published worlds. A query can belong to only one query group. Query groups do not determine the execution order of queries; queries are executed when the results of the query are needed to display an object. For more information, see Specifying drawing order.
To create a query group, click Edit --> Query Groups.