Mixed example

This query performs a mixture of merge and nested-loop joins:

select pub_name, au_lname, price
from titles t, authors a, titleauthor ta,
            publishers p
where t.title_id = ta.title_id
    and a.au_id = ta.au_id
    and p.pub_id = t.pub_id
    and type = ’business’
    and price < $25

Adaptive Server executes this query in three steps:

Figure 23-5 shows the steps.

Figure 23-5: Multiple steps in processing a merge join