Using subsumption for semantic query optimization