Structure of dbcc traceon(302) output

dbcc traceon(302) prints its output as the optimizer examines the clauses for each table involved in a query. The optimizer first examines all search clauses and determines the cost for each possible access method for the search clauses for each table in the query. It then examines each join clause and the cost of available indexes for the joins.

dbcc traceon(302) output prints each search and join analysis as a block of output, delimited with a line of asterisks.

The search and join blocks each contain smaller blocks of information:

For joins, each join order is represented by a separate block. For example, for these joins on titles, titleauthor, and authors:

    where titles.title_id = titleauthor.title_id
        and authors.au_id = titleauthor.au_id

there is a block for each join, as follows: