This the second half of my efficiency question but I kept it separate because this is specifically regarding finding speed in an instance reference.I have this logic as part of a caselist filter:((#user/current_level2_code = ((instance('casedb')/casedb/case[@case_id = current()/index/parent]/level2))))and(((instance('casedb')/casedb/case[@case_type = 'household_member'][@status='open'][index/parent = current()/index/parent][resident_id = current()/resident_underfive_motherid]/location = '1')and (location='1') ))How can I best order the instance references to get a quick response from this caselist?For reference, on a mobile device with:-about 2,500 cases with about 1,500 that satisfy condition one (the level2 question)of those 1,500 approx 1,000 are household_membersThis filter (to include the age-bracketing formulas in my previous question) takes approximately 120 seconds to execute, resulting in a list of 9 cases.
Does order of arguments in an instance reference affect efficiency (and speed on the mobile device)?
commcare