Hi Kenan,
Can we try without the var_b and var_c constraints? If we just take the first 1000 or 5000 Device nodes (var_a), what’s the chance that we will find Object and Indicator as per your needs in query block a?
If you find that a certain number of devices satisfies your need consistently, you could get reasonable query performance. Query block a would not have to open the entire Device universe and would perform efficiently. The idea is to limit this Device universe as efficiently as possible, as that forms the most expensive and time consuming part of the query.