Computing/estimating the cost of a logical query plan