{"id":758,"date":"2020-01-08T20:26:32","date_gmt":"2020-01-08T20:26:32","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/performance\/microflow-retrieve-from-database-and-aggregate-where-list-also-used\/"},"modified":"2020-07-08T14:35:30","modified_gmt":"2020-07-08T14:35:30","slug":"retrieveaggregatenullified","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/retrieveaggregatenullified","title":{"rendered":"Retrieve &#038; aggregate combo should not be nullified by using the list"},"content":{"rendered":"\n<p style=\"text-align:center\">Introduced in version: 1.3 (29 Jan 2020)<\/p>\n\n\n\n<p>If the resulting list from a database retrieve is used in aggregate list action it should not be used anywhere else.<\/p>\n\n\n\n<p>Instead, introduce a second retrieve for use in the other place. This is especially effective if there is a split between the first retrieve and aggregate and the later usage of the resulting list in the microflow since in that case the second retrieve will only happen if the split condition is satisfied.<\/p>\n\n\n\n<p><strong>Noncompliant solution:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"256\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-64.png\" alt=\"\" class=\"wp-image-1015\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-64.png 562w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-64-480x219.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 562px, 100vw\" \/><\/figure>\n\n\n\n<p><strong>Compliant solution:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"211\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-65.png\" alt=\"\" class=\"wp-image-1016\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-65.png 560w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-65-480x181.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 560px, 100vw\" \/><\/figure>\n","protected":false},"featured_media":0,"parent":95,"menu_order":24,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-758","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/758"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=758"}],"version-history":[{"count":6,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/758\/revisions"}],"predecessor-version":[{"id":1017,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/758\/revisions\/1017"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/95"}],"next":[{"title":"Retrieves over the same association should be grouped together","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/xpathassociationgrouped","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1232"}],"prev":[{"title":"Positive conditions should be preferred when retrieving data","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/negativepositivexpath","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/235"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=758"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}