All kinds of joins and related optimizations