Completed a basic greedy heuristic algorithm for cost-based join order.