CORE-4211: reorganized the data object query for efficiency.

This change requires an index to work efficiently: create index r_objt_access_object_id_index on r_objt_access (object_id);