In some cases, you might think that there is a better way to execute your queries than the query plan selected by the Query Optimizer. SQL Server 2000 provides several optimizer hints to tailor the execution to your needs.
You can specify the type of join to execute by using the LOOP, HASH, MERGE, or REMOTE hints of the JOIN clause. The query in Listing 11.23 forces a LOOP join to connect the Orders and Order Details tables, a MERGE join between the Products and Order Details table, and a HASH join to connect the Categories and Products tables. The purpose of this example is to show how to use the optimizer hints; the output is the same you can have without using these optimizer hints.
Joins were covered in Chapter 5. The REMOTE ...