private static JoinOrder GetBestJoinOrder(TableRefBinding[] tables, JoinCondition[] joinConditions, ICollection<ExpressionNode> andParts) { // Compute all join orders JoinOrderGenerator generator = new JoinOrderGenerator(joinConditions, tables); JoinOrder[] allJoinOrders = generator.GenerateAll(); // Compute best join order JoinOrder bestJoinOrder = GetBestJoinOrder(allJoinOrders, andParts, tables); return bestJoinOrder; }
private static JoinOrder GetBestJoinOrder(TableRefBinding[] tables, JoinCondition[] joinConditions, ICollection <ExpressionNode> andParts) { // Compute all join orders JoinOrderGenerator generator = new JoinOrderGenerator(joinConditions, tables); JoinOrder[] allJoinOrders = generator.GenerateAll(); // Compute best join order JoinOrder bestJoinOrder = GetBestJoinOrder(allJoinOrders, andParts, tables); return(bestJoinOrder); }