I’m trying to optimize query performance and have had to resort to using optimizer hints. But I’ve never learned if the optimizer will use more than one hint at a time.
e.g.
SELECT /*+ INDEX(i dcf_vol_prospect_ids_idx)*/ /*+ LEADING(i vol) */ /*+ ALL_ROWS */ i.id_number, ... FROM i_table i JOIN vol_table vol on vol.id_number = i.id_number JOIN to_a_bunch_of_other_tables... WHERE i.solicitor_id = '123' AND vol.solicitable_ind = 1;
The explain plan shows the same cost, but I know that’s just an estimate.
Please assume that all table and index statistics have been calculated. FYI, the index dcf_vol_prospect_ids_idx is on the i.solicitor_id column.
Thanks,
Stew
Try specifying all the hints in a single comment block, as shown in this example from the wonderful Oracle documentation (http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/hintsref.htm).