The Operator Ordering Algorithm
similar to Kruskal’s spanning tree algorithm, but with a twist:
is polynomial: O(n3), can handle 100 joins in 32 msecs;
handles nestings & unnestings as graph dependencies;
can handle disjunctions and dependent predicates;
beats other related proposals in performance.