Linking logical and physical operators, deciding how to represent physical queries