added query for relation sizes