Hello everyone
I have noticed that (at least in our environment, with ~100K clients) these two queries take a VERY different time to complete:
number of bes computers whose (active directory path of it = "whatever")
takes ~130 seconds
number of bes computers whose (value of results (bes property "Active Directory Path",it) = "whatever")
takes 6 seconds
until now, I had given for granted that they should be equivalent, but after running a comparative test, that’s obviously not so…
Trying to understand why, but that’s just a guess, I would say that the first one collects all the bes computer, then it ‘renders’ their AD property, and verifies that its value is the required one.
The second one matches the results of the property with the right value and then ‘ties’ them to the corresponding bes computer
but it’s just us? Can someone verify this and / or offer an insight?
Many thanks!
Hi,
I ran some tests in my environment and I hope I got to the root of the issue – I took out the heart of what you’re looking at with your relevance and removed the extra pieces to make the results more even:
Your example:
If we take your values of results example:
Q: values of results from (bes property ("Active Directory Path")) of (bes computers)
T: 1 second
We see that it’s about 20x faster than the Active Directory Paths inspector:
Q: active directory paths of bes computers
T: 20 seconds
Another Property
When we look at other properties we do not find this same discrepancy:
Q: values of results from (bes property ("DNS Name")) of (bes computers)
T: 1 second
Appears to take the exact same amount as:
Q: hostnames of bes computers
T: 1 second
Return Types
What is important to notice is that the values of <results>
inspector is returning a <string>
object whereas the Active Directory Path of <Computer>
inspector is returning a <distinguished name>
object.
My initial guess would be that it’s this overhead that causes the discrepancy.
To put this theory to the test we can actually cast the values of results from (bes property ("Active Directory Path")) of (bes computers)
result to a distinguished name object like this:
Q: distinguished names (values of results from (bes property ("Active Directory Path")) of (bes computers))
T: 20 seconds
Which appears to take exactly as long as the built-in property:
Q: active directory paths of bes computers
T: 20 seconds
Summary
So in summary – the answer is that the two methods you’re using are not actually returning the same thing. The Built-In Active Directory Path inspector is trying to be helpful and giving you back a complex object where the values of results
method is returning raw strings.
4 Likes
Thanks for the quick and really complete answer @strawgate!
What I had missed is that the “path” in “active directory path” is a property of the object “active directory”.
Once you made it clear, it all made sense ![:slight_smile: :slight_smile:](https://forum.bigfix.com/images/emoji/twitter/slight_smile.png?v=5)
Many thanks again!