Retrieve by Association properties also need query to the database ?

0
I use the Retrieve by Association in microflow ,and i find when i run the Retrieve ,and it also execute  a sql in databse, | 2020-09-28 22:20:15.600769 | root[root] @ localhost [127.0.0.1] |       215 |         1 | Query        | SELECT `companymanagement$project`.`id`, `companymanagement$project`.`name`, `companymanagement$project`.`system$owner`, `companymanagement$project`.`system$changedby`  FROM `companymanagement$project`  WHERE `companymanagement$project`.`id` = 9570149208162306 |   is the sql executed for the Retrieve  everytime? even i use by Association , not form database? This seriously affects the performance of microflows
asked
1 answers
2

The retrieve by association is using the cached version of the object if there is already a cached version. If not, it retrieves it from the database once. A second retrieve by association will then use the cached version. This guarantees that you get data. Otherwise, the whole database would need to be cached or you may not get any result.

Short version:
Retrieve by association is returning the cahded version if available, otherwise it returns the version from the database.

answered