Reduce amount of queries when inserting apps to store queue