db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Trivial Update of "LanguageOptimize" by Army
Date Tue, 07 Nov 2006 22:52:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by Army:

  All of that said, there are three primary methods in !OptimizerImpl that encapsulate the
general process of trying to find the "best join order" for a given !OptimizerImpl's list
of Optimizables.  These three methods, along with the ways in which they interact, are perhaps
most easily summarized by the following code in !SelectNode.optimize():
- 	/* Optimize this SelectNode */
+ /* Optimize this SelectNode */
- 	while (optimizer.getNextPermutation())
+ while (optimizer.getNextPermutation())
- 	{
+ {
- 		while (optimizer.getNextDecoratedPermutation())
+     while (optimizer.getNextDecoratedPermutation())
- 		{
+     {
- 			optimizer.costPermutation();
+         optimizer.costPermutation();
- 		}
- 	}
+     }
+ }
  Note that by the time we get to this code, "optimizer" is an instance of !OptimizerImpl
whose list of Optimizables is the FROM list for the !SelectNode, and whose list of predicates
corresponds to the !SelectNode's WHERE clause.  Note also that !SelectNode is not the only
place where we find this kind of loop; we find a similar loop in !TableOperatorNode.

View raw message