ViadeaZhu's article you referenced in msg #2 is a good one.
The filter operation (as opposed to filter predicate condition) is like nested loop, except unlike and better than NL, it tries to cache the data from the driving table, 256 or 1024 rows depending on whether you're in 10g. See Jonathan Lewis's CBO book. The filter operation can also have more than 2 child operations. See Christian Antognini's book. Having said all that, you can simply think of filter as the same as NL for practical purposes, until you need a detailed analysis of the plan.
Under what condition will you get a filter operation in the plan? It's of course cost-based. Consider three choices, hash join, NL, filter. Many people have to suppress subquery nesting to demo a filter operation, otherwise they would get a hash join. But subquery unnesting is not a condition that definitely leads to filter. If you don't have enough distinct values, the cost for NL may be lower than filter and NL will be chosen.
Yong Huang
|