Extensional Knowledge for semantic query optimization in a mediator based system