I Was also wondering about the efficiency of these ops. Especially when you have large databases. I always used
FIND & IF SEARCH_COUNT>0
BUT... Ran into problems when the Number of rows found is > 1000, since aware IM only processes thousand rows at a time. In the logs it showed 0 or 1 even though there were many rows...
So after that we changed and started using EXISTS & then FIND... However, I Always wonder if the resources get double taxed because the same query is basically ran twice.
We Also started using LIST_SIZE... Which I think work quite well for smaller lists... But not sure if this is the Sage as Aggregate Functions?
So Typically I would do:
IF LIST_SIZE(Property.Owners)>0 THEN
FIND Owner WHERE Owner IN Property.Owner
MyProcess
I Know this MO can't always be applied, but works very well when we Write our API's and need to return Nested objects in our JSON responses. For example where Property has many Owners... And Owners has many Contacts... Or something like that. 🙂