For things like uninventory of resources, the resource id and parent id are queried.
Putting an index on this will considerably speed up things.
For the long term, some more clever (pre)computation is needed instead of the relatively expensive queries we have today.
We have individual indexes on ID and PARENT_ID. I think this is sufficient.