Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Using Hints for Views
Hi,
I am trying to use the cbo in Oracle 7.3. Running this query below with the cbo takes 13 secs while it takes 500 msec with the rbo. The rbo uses the indexes I have stated in the index hint, however the cbo does full table scans.
Is my index hint worded correctly? The cbo ignores this hint. The tables in the from clause are actually views. Does this have anything to do with the fact that the hint is being ignored?
SELECT /*+ INDEX(D TBLINVESTMENT_TABLE_ME,B TBLINVESTMENTS_NEW_ME,C TBLINVESTMENT_DESCRIPTION_ME,E TBLEMPLOYEES_ME) */
d.INV_DRIVER#, c.INVESTMENT#, b.year, F.DEPARTMENT_NAME, E.FIRST_NAME, E.LAST_NAME,
Sum(b.CONTRACT) CONTRACT, SUM(b.NMCOST) NMCOST, SUM(b.INTEREST) INTEREST, SUM(B.REMOVAL) REMOVAL, SUM(b.REMOVAL_OVERHEAD) REMOVAL_OVERHEAD, SUM(b.CASHFLOW_OVERHEAD) CASHFLOW_OVERHEAD, SUM(b.OVERHEAD) OVERHEAD, SUM(b.RECOVERABLE) RECOVERABLE, SUM(b.CTI) CTI
vw_me_investments_new b, vw_me_investment_description c, vw_me_Investment_table d, VW_ME_EMPLOYEE E, VW_RPT_COMMITTINGDEPARTMENTID F
b.INVESTMENT# = c.INVESTMENT# and c.Investment# = d.Investment# and b.Investment# = d.Investment# AND C.EMPLOYEE# = E.EMPLOYEE# AND C.COMMITTING_DEP_ID = F.ID
Thanks,
April
Received on Mon Aug 19 2002 - 13:05:08 CDT