Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Urgent Tuning Question....
Each,
I have the query shown below which is running slowly.
journal_subscribers table has around 400,000 rows and a non-unique index on jsu_journal_code
rate_types table has 40 rows and a unique index on rty_code
payment_methods has 7 rows and a unique index on payment_method
select js.jsu_type, js.jsu_code, js.jsu_charge_type, rt.organisation, js.jsu_copies from journal_subscribers js, rate_types rt, payment_methods pm where js.jsu_journal_code = v_journal_code and js.jsu_start_date < p_start and rt.jsu_rate = rt.rty_code(+) and jsu_payment_code = pm.payment_code and pm.real_payment_code = '1'; ----------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes |Cost |
It seems the optimizer is choosing to use full table scans and a hash join rather than using the indexes. Any ideas why it would do this and not use the indexes and a nested loop or how i can improve the speed of the query?
Am using version 9.2.0.4
Thanks Received on Wed May 10 2006 - 06:56:02 CDT