I don’t have a large deployment handy to test on, but I think this form might improve things. Can you try it out and let me know?
q: (name of item 0 of it | "no computername", database name of item 0 of it | "", operating system of item 0 of it | "", locked flag of item 0 of it as string | "", item 1 of it, item 2 of it) of (item 0 of it, unique value of ( concatenation ";" of values of (results (item 0 of it, elements of item 1 of it)) of it), unique value of concatenation ";" of values of (results (item 0 of it, elements of item 2 of it)) of it) of (elements of item 0 of it, item 1 of it, item 2 of it) of (set of bes computers whose (exists name of it AND exists hostname of it and exists last report time of it and exists operating system of it), set of bes properties whose (name of it = "In Maintenance Window"), set of bes properties whose (name of it = "Processor Brand String"))
A: ENDPOINT-1, BES-ROOT, Win10 10.0.18362.778 (1903), False, , Intel(R) Xeon(R) CPU E7- 4870 @ 2.40GHz;Intel(R) Xeon(R) CPU E7- 4870 @ 2.40GHz;Intel(R) Xeon(R) CPU E7- 4870 @ 2.40GHz
A: BES-Root, BES-ROOT, Microsoft Windows Server 2016 or later (64-bit), False, ,
A: 192.168.1.44, BES-ROOT, , False, ,
The expanded form of this is
/* retrieve several properties of the bes computer (item 0), and present the property results (items 1 and 2) */
(
name of item 0 of it | "no computername"
, database name of item 0 of it | ""
, operating system of item 0 of it | ""
, locked flag of item 0 of it as string | ""
/* value of bes property results */
, item 1 of it
, item 2 of it
)
of
/* For this computer, retrieve the property results from each property set */
(
item 0 of it
, unique value of
(
concatenation ";" of values of
(
results
(
item 0 of it, elements of item 1 of it
)
)
of it
)
, unique value of concatenation ";" of values of
(
results
(
item 0 of it, elements of item 2 of it
)
)
of it
)
of
/* Expand the bes computer set, while passing along each bes property set as-is */
(
elements of item 0 of it, item 1 of it, item 2 of it
)
of
(
/* Build the set of computers from which to pull results */
set of bes computers
whose
(
exists name of it
AND
exists hostname of it
and
exists last report time of it
and
exists operating system of it
)
/* Look up the first property from which to pull results */
, set of bes properties
whose
(
name of it = "In Maintenance Window"
)
/* Look up the second property from which to pull results */
, set of bes properties
whose
(
name of it = "Processor Brand String"
)
)
Basically I build a set of bes computers, and a set of each bes property. A “set” qualifies as a single item as far as relevance loops go, so passing a set of 5 computers up to the next level is cheaper than moving up a level 5 times (once per computer).
Try this with your properties, and if it’s an improvement I can write up a litter further about how it works.