示例#1
0
		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;
		}
示例#2
0
        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);
        }