I have a query similar to the one below. Im trying to force a STRAIGHT JOING to Table5 which has an index on Id & Date. For some reason, the optimizer isnt picking the INDEX to execute the query (and subsequently doing a full scan on a 250 million+ row table) so Im trying to force the STRAIGHT JOIN so the order is executed as I indicate.
Im having a problem with the syntax below. Can someone shed some light on exactly how I would mix these join types for this query. SELECT ....... FROM Table1 INNER JOIN Table2 USING (Id) INNER JOIN Table3 USING (Id) INNER JOIN Table4 USING (Id) STRAIGHT JOIN Table5 ON (Table4.Id = Table5.Id) INNER JOIN Table6 ON (Id) WHERE Table1.Type IN (......) AND Table5.Date >= '2004-04-01'; Thank you!