PLA-211 changed for using externalshareddb while quering
PLA-211 limiting number of ids to 100