Query Hint on OBIEE

Hi,
how can I use Hints in OBIEE Query in OBIEE 11g?
Thank you, best regards. R.

Hi,
Check this,
http://www.howtoexam.com/index.php?option=com_content&view=article&id=75%3Ausing-hints-in-obiee-rpd-and-answers&catid=790%3Acomputers-and-software&Itemid=166
Thanks
Satya

Similar Messages

  • How to use Oracle Hints in OBIEE

    Hello guys
    I have a report that is running forever and I have reviewed the explain plan over and over, which makes me think that the join between these 2 tables are slowing everything down --- The fact table has 10Billion records and the Dim has 10 Millions records. Even if the report has filters on various columns of the 2 tables, it is still taking forever. The explain is showing that its doing a nested loop join of these 2 tables which takes a lot of time.
    I am thinking of using some Hint to force the query to scan the dimension table first (with the filter condition I defined, it will return 80 rows only from Dim table), and then use the result set of the scanning to go and look for matching records only in the fact table. Its should help speed up the query..
    I'd like to know what kind of hints can help with that kind of operation, also how to define these kind of hints in OBIEE. Now I know that in Physical Layers, I can include hints in physical table property, but how to determine which table (fact or dim) to embed the join hints?
    Need advice from anybody who have experience working with hints?
    Much appreciation!

    Just an update:
    I have tried a couple of join operation hints like USE_NL and USE_HASH hints, it changes the join method but didn't help with performance at all.
    The original SQL that OBIEE generates is: ----------Takes about 20 mins to return a dozen rows
    select sum(T991020.LP Amount) as c1,
    T991021.DAYOFWEEK as c2,
    T991021.PU DATES as c3
    from RD_Grant.PU_DATES T991021, Dimension -----Huge
    PU_Grant.PU_FACTS_9 T991020 FACT ----Gigantic
    where (T991020.COMPANY = T991021.COMPANY
    and T991020.DATES = T991021.DATES
    and T991020.DATES between "10/10/2009" and "31/10/2009"
    and T991021.DAYOFWEEK = 'Sunday'
    and T991021.DATES between '09/13/2009' and '11/03/2009')
    group by T991021.PU DATES, T991021.DAYOFWEEK
    Basically I am still thinking of finding a way to force the query to scan the dimension table first (with the filter condition I defined, it will return 80 rows only from Dim table), and then use the result set of the scanning to go and look for matching records only in the fact table. Its should help speed up the query..
    Any suggestions?
    Thanks
    Edited by: user7276913 on Nov 5, 2009 7:07 PM
    Edited by: user7276913 on Nov 5, 2009 7:22 PM

  • Query HINT help requested Pls.

    A query thus:
    SELECT equipment_id,
    vsemml.stock_equipment_id,
    game_ware_id
    FROM v_stocked_equipment_inven_his vsdeih,
    v_stock_equipment_mod_man_list vsemml
    WHERE vsemml.stock_equipment_id = vsdeih.stock_equipment_id(+)
    AND equipment_status_code IN
    ('ALL', 'AVA' )
    AND ec_end_date IS NULL
    AND eav_end_date IS NULL
    GROUP BY equipment_id,
    vsemml.stock_equipment_id,
    game_ware_id
    HAVING COUNT (model_attribute_value_id) =
    (SELECT COUNT (*)
    FROM stock_equipment JOIN stock_equipment_attrib_value
    USING (stock_equipment_id)
    WHERE stock_equipment_id =
    vsemml.stock_equipment_id);
    has result :
    513 rows selected.
    Elapsed: 00:04:59.17
    Execution Plan
    Plan hash value: 3816309895
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 240 | 21120 | | 38010 (7)| 00:07:37 |
    |* 1 | FILTER | | | | | | |
    | 2 | HASH GROUP BY | | 240 | 21120 | | 38010 (7)| 00:07:37 |
    |* 3 | FILTER | | | | | | |
    |* 4 | HASH JOIN OUTER | | 23915 | 2055K| | 38006 (7)| 00:07:37 |
    |* 5 | HASH JOIN | | 42 | 630 | | 7 (15)| 00:00:01 |
    | 6 | TABLE ACCESS FULL | MODEL | 31 | 279 | | 3 (0)| 00:00:01 |
    | 7 | TABLE ACCESS FULL | STOCK_EQUIPMENT | 42 | 252 | | 3 (0)| 00:00:01 |
    | 8 | VIEW | V_STOCKED_EQUIPMENT_INVEN_HIS | 23915 | 1704K| | 37998 (7)| 00:07:36 |
    | 9 | HASH UNIQUE | | 23915 | 2989K| 6392K| 37998 (7)| 00:07:36 |
    |* 10 | HASH JOIN RIGHT OUTER | | 23915 | 2989K| | 37307 (7)| 00:07:28 |
    | 11 | TABLE ACCESS FULL | GAME_WARE | 325 | 1950 | | 3 (0)| 00:00:01 |
    |* 12 | HASH JOIN RIGHT OUTER | | 23915 | 2849K| | 37303 (7)| 00:07:28 |
    | 13 | TABLE ACCESS FULL | GAMESET | 825 | 8250 | | 5 (0)| 00:00:01 |
    |* 14 | HASH JOIN | | 23915 | 2615K| | 37297 (7)| 00:07:28 |
    | 15 | TABLE ACCESS FULL | EQUIPMENT_STATUS | 16 | 128 | | 3 (0)| 00:00:01 |
    |* 16 | HASH JOIN | | 23915 | 2428K| | 37293 (7)| 00:07:28 |
    | 17 | TABLE ACCESS FULL | STOCK_EQUIPMENT | 42 | 252 | | 3 (0)| 00:00:01 |
    |* 18 | HASH JOIN | | 645K| 60M| | 37278 (7)| 00:07:28 |
    | 19 | INDEX FULL SCAN | XPKSTOCK_EQUIPMENT_ATTRIB_VAL | 42 | 294 | | 1 (0)| 00:00:01 |
    |* 20 | HASH JOIN | | 5288K| 458M| 9M| 37180 (7)| 00:07:27 |
    | 21 | TABLE ACCESS FULL | EQUIPMENT_ATTRIBUTE_VALUE | 297K| 6672K| | 784 (3)| 00:00:10 |
    |* 22 | HASH JOIN | | 7467K| 484M| 6328K| 5447 (5)| 00:01:06 |
    | 23 | INDEX FAST FULL SCAN | PK_EQUIPMENT_CONFIGURATION | 380K| 1859K| | 398 (3)| 00:00:05 |
    |* 24 | HASH JOIN | | 380K| 22M| 4528K| 3235 (2)| 00:00:39 |
    |* 25 | HASH JOIN | | 140K| 2876K| | 563 (2)| 00:00:07 |
    | 26 | MERGE JOIN | | 281 | 3372 | | 6 (17)| 00:00:01 |
    | 27 | TABLE ACCESS BY INDEX ROWID| SITE_TYPE | 4 | 20 | | 2 (0)| 00:00:01 |
    | 28 | INDEX FULL SCAN | PK_SITE_TYPE | 4 | | | 1 (0)| 00:00:01 |
    |* 29 | SORT JOIN | | 281 | 1967 | | 4 (25)| 00:00:01 |
    | 30 | VIEW | index$_join$_016 | 281 | 1967 | | 3 (0)| 00:00:01 |
    |* 31 | HASH JOIN | | | | | | |
    | 32 | INDEX FAST FULL SCAN | PK_SITE | 281 | 1967 | | 1 (0)| 00:00:01 |
    | 33 | INDEX FAST FULL SCAN | XIF1SITE | 281 | 1967 | | 1 (0)| 00:00:01 |
    | 34 | TABLE ACCESS FULL | LOCATION | 140K| 1232K| | 554 (2)| 00:00:07 |
    | 35 | TABLE ACCESS FULL | EQUIPMENT_CONFIGURATION | 380K| 15M| | 1460 (2)| 00:00:18 |
    | 36 | SORT AGGREGATE | | 1 | 6 | | | |
    | 37 | NESTED LOOPS | | 1 | 6 | | 0 (0)| 00:00:01 |
    |* 38 | INDEX UNIQUE SCAN | XPKSTOCK_EQUIPMENT | 1 | 3 | | 0 (0)| 00:00:01 |
    |* 39 | INDEX RANGE SCAN | XIF1STOCK_EQUIPMENT_ATTRIB_VAL | 1 | 3 | | 0 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter(COUNT("MODEL_ATTRIBUTE_VALUE_ID")= (SELECT COUNT(*) FROM "STOCK_EQUIPMENT_ATTRIB_VALUE"
    "STOCK_EQUIPMENT_ATTRIB_VALUE","STOCK_EQUIPMENT" "STOCK_EQUIPMENT" WHERE "STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"=:B1 AND
    "STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID" AND
    "STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID"=:B2))
    3 - filter(("EQUIPMENT_STATUS_CODE"='ALL' OR "EQUIPMENT_STATUS_CODE"='AVA') AND "EC_END_DATE" IS NULL AND "EAV_END_DATE"
    IS NULL)
    4 - access("SE"."STOCK_EQUIPMENT_ID"="VSDEIH"."STOCK_EQUIPMENT_ID"(+))
    5 - access("SE"."MODEL_ID"="M"."MODEL_ID")
    10 - access("GS"."GAME_WARE_ID"="GW"."GAME_WARE_ID"(+))
    12 - access("EC"."GAMESET_ID"="GS"."GAMESET_ID"(+))
    14 - access("EC"."EQUIPMENT_STATUS_ID"="ES"."EQUIPMENT_STATUS_ID")
    16 - access("EC"."MODEL_ID"="STOCK_EQUIPMENT"."MODEL_ID" AND
    "STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID")
    18 - access("MODEL_ATTRIBUTE_VALUE_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."MODEL_ATTRIBUTE_VALUE_ID")
    20 - access("EC"."EQUIPMENT_ID"="EAV"."EQUIPMENT_ID")
    filter("EAV"."START_DATE">="EC"."START_DATE" AND ("EAV"."END_DATE" IS NULL AND "EC"."END_DATE">="EAV"."START_DATE" OR
    "EC"."END_DATE" IS NULL OR "EAV"."END_DATE"<="EC"."END_DATE") OR "EC"."START_DATE">="EAV"."START_DATE" AND ("EC"."END_DATE"
    IS NULL AND "EAV"."END_DATE">="EC"."START_DATE" OR "EAV"."END_DATE" IS NULL OR "EC"."END_DATE"<="EAV"."END_DATE"))
    22 - access("EC"."EQUIPMENT_ID"="EC"."EQUIPMENT_ID")
    24 - access("EC"."LOCATION_ID"="L"."LOCATION_ID")
    25 - access("L"."SITE_ID"="S"."SITE_ID")
    29 - access("S"."SITE_TYPE_ID"="ST"."SITE_TYPE_ID")
    filter("S"."SITE_TYPE_ID"="ST"."SITE_TYPE_ID")
    31 - access(ROWID=ROWID)
    38 - access("STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"=:B1)
    39 - access("STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID")
    filter("STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID"=:B1)
    Query altered to:
    =================
    SELECT equipment_id,
    vsemml.stock_equipment_id,
    game_ware_id
    FROM v_stocked_equipment_inven_his vsdeih,
    v_stock_equipment_mod_man_list vsemml
    WHERE vsemml.stock_equipment_id = vsdeih.stock_equipment_id(+)
    AND equipment_status_code = 'ALL'
    AND ec_end_date IS NULL
    AND eav_end_date IS NULL
    GROUP BY equipment_id,
    vsemml.stock_equipment_id,
    game_ware_id
    HAVING COUNT (model_attribute_value_id) =
    (SELECT COUNT (*)
    FROM stock_equipment JOIN stock_equipment_attrib_value
    USING (stock_equipment_id)
    WHERE stock_equipment_id =
    vsemml.stock_equipment_id)
    union
    SELECT equipment_id,
    vsemml.stock_equipment_id,
    game_ware_id
    FROM v_stocked_equipment_inven_his vsdeih,
    v_stock_equipment_mod_man_list vsemml
    WHERE vsemml.stock_equipment_id = vsdeih.stock_equipment_id(+)
    AND equipment_status_code = 'AVA'
    AND ec_end_date IS NULL
    AND eav_end_date IS NULL
    GROUP BY equipment_id,
    vsemml.stock_equipment_id,
    game_ware_id
    HAVING COUNT (model_attribute_value_id) =
    (SELECT COUNT (*)
    FROM stock_equipment JOIN stock_equipment_attrib_value
    USING (stock_equipment_id)
    WHERE stock_equipment_id =
    vsemml.stock_equipment_id);
    Results in:
    513 rows selected.
    Elapsed: 00:00:07.40
    Execution Plan
    Plan hash value: 3317078232
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 2 | 176 | | 6431 (51)| 00:01:18 |
    | 1 | SORT UNIQUE | | 2 | 176 | | 6431 (51)| 00:01:18 |
    | 2 | UNION-ALL | | | | | | |
    |* 3 | FILTER | | | | | | |
    | 4 | HASH GROUP BY | | 1 | 88 | | 3216 (2)| 00:00:39 |
    |* 5 | HASH JOIN | | 95 | 8360 | | 3214 (2)| 00:00:39 |
    |* 6 | HASH JOIN | | 42 | 630 | | 7 (15)| 00:00:01 |
    | 7 | TABLE ACCESS FULL | MODEL | 31 | 279 | | 3 (0)| 00:00:01 |
    | 8 | TABLE ACCESS FULL | STOCK_EQUIPMENT | 42 | 252 | | 3 (0)| 00:00:01 |
    | 9 | VIEW | V_STOCKED_EQUIPMENT_INVEN_HIS | 95 | 6935 | | 3207 (2)| 00:00:39 |
    | 10 | HASH UNIQUE | | 95 | 12160 | | 3207 (2)| 00:00:39 |
    |* 11 | HASH JOIN RIGHT OUTER | | 95 | 12160 | | 3206 (2)| 00:00:39 |
    | 12 | TABLE ACCESS FULL | GAME_WARE | 325 | 1950 | | 3 (0)| 00:00:01 |
    |* 13 | HASH JOIN OUTER | | 95 | 11590 | | 3202 (2)| 00:00:39 |
    |* 14 | HASH JOIN | | 95 | 10640 | | 3196 (2)| 00:00:39 |
    | 15 | TABLE ACCESS FULL | SITE_TYPE | 4 | 20 | | 3 (0)| 00:00:01 |
    |* 16 | HASH JOIN | | 95 | 10165 | | 3193 (2)| 00:00:39 |
    | 17 | VIEW | index$_join$_021 | 281 | 1967 | | 3 (0)| 00:00:01 |
    |* 18 | HASH JOIN | | | | | | |
    | 19 | INDEX FAST FULL SCAN | PK_SITE | 281 | 1967 | | 1 (0)| 00:00:01 |
    | 20 | INDEX FAST FULL SCAN | XIF1SITE | 281 | 1967 | | 1 (0)| 00:00:01 |
    | 21 | NESTED LOOPS | | 95 | 9500 | | 3189 (2)| 00:00:39 |
    |* 22 | HASH JOIN | | 96 | 8736 | 4440K| 3093 (2)| 00:00:38 |
    |* 23 | HASH JOIN | | 56789 | 3771K| | 1679 (2)| 00:00:21 |
    |* 24 | HASH JOIN | | 2894 | 178K| | 1273 (1)| 00:00:16 |
    | 25 | INDEX FULL SCAN | XPKSTOCK_EQUIPMENT_ATTRIB_VAL | 42 | 294 | | 1 (0)| 00:00:01 |
    |* 26 | HASH JOIN | | 2894 | 158K| | 1271 (1)| 00:00:16 |
    | 27 | TABLE ACCESS FULL | STOCK_EQUIPMENT | 42 | 252 | | 3 (0)| 00:00:01 |
    |* 28 | TABLE ACCESS BY INDEX ROWID| EQUIPMENT_CONFIGURATION | 1279 | 53718 | | 1265 (1)| 00:00:16 |
    | 29 | NESTED LOOPS | | 1860 | 93000 | | 1268 (1)| 00:00:16 |
    |* 30 | TABLE ACCESS FULL | EQUIPMENT_STATUS | 1 | 8 | | 3 (0)| 00:00:01 |
    |* 31 | INDEX RANGE SCAN | XIF3EQUIPMENT_CONFIGURATION | 23796 | | | 48 (3)| 00:00:01 |
    | 32 | INDEX FAST FULL SCAN | PK_EQUIPMENT_CONFIGURATION | 380K| 1859K| | 398 (3)| 00:00:05 |
    |* 33 | TABLE ACCESS FULL | EQUIPMENT_ATTRIBUTE_VALUE | 242K| 5451K| | 785 (3)| 00:00:10 |
    | 34 | TABLE ACCESS BY INDEX ROWID | LOCATION | 1 | 9 | | 1 (0)| 00:00:01 |
    |* 35 | INDEX UNIQUE SCAN | PK_LOCATION | 1 | | | 0 (0)| 00:00:01 |
    | 36 | TABLE ACCESS FULL | GAMESET | 825 | 8250 | | 5 (0)| 00:00:01 |
    | 37 | SORT AGGREGATE | | 1 | 6 | | | |
    | 38 | NESTED LOOPS | | 1 | 6 | | 0 (0)| 00:00:01 |
    |* 39 | INDEX UNIQUE SCAN | XPKSTOCK_EQUIPMENT | 1 | 3 | | 0 (0)| 00:00:01 |
    |* 40 | INDEX RANGE SCAN | XIF1STOCK_EQUIPMENT_ATTRIB_VAL | 1 | 3 | | 0 (0)| 00:00:01 |
    |* 41 | FILTER | | | | | | |
    | 42 | HASH GROUP BY | | 1 | 88 | | 3216 (2)| 00:00:39 |
    |* 43 | HASH JOIN | | 95 | 8360 | | 3214 (2)| 00:00:39 |
    |* 44 | HASH JOIN | | 42 | 630 | | 7 (15)| 00:00:01 |
    | 45 | TABLE ACCESS FULL | MODEL | 31 | 279 | | 3 (0)| 00:00:01 |
    | 46 | TABLE ACCESS FULL | STOCK_EQUIPMENT | 42 | 252 | | 3 (0)| 00:00:01 |
    | 47 | VIEW | V_STOCKED_EQUIPMENT_INVEN_HIS | 95 | 6935 | | 3207 (2)| 00:00:39 |
    | 48 | HASH UNIQUE | | 95 | 12160 | | 3207 (2)| 00:00:39 |
    |* 49 | HASH JOIN RIGHT OUTER | | 95 | 12160 | | 3206 (2)| 00:00:39 |
    | 50 | TABLE ACCESS FULL | GAME_WARE | 325 | 1950 | | 3 (0)| 00:00:01 |
    |* 51 | HASH JOIN OUTER | | 95 | 11590 | | 3202 (2)| 00:00:39 |
    |* 52 | HASH JOIN | | 95 | 10640 | | 3196 (2)| 00:00:39 |
    | 53 | TABLE ACCESS FULL | SITE_TYPE | 4 | 20 | | 3 (0)| 00:00:01 |
    |* 54 | HASH JOIN | | 95 | 10165 | | 3193 (2)| 00:00:39 |
    | 55 | VIEW | index$_join$_044 | 281 | 1967 | | 3 (0)| 00:00:01 |
    |* 56 | HASH JOIN | | | | | | |
    | 57 | INDEX FAST FULL SCAN | PK_SITE | 281 | 1967 | | 1 (0)| 00:00:01 |
    | 58 | INDEX FAST FULL SCAN | XIF1SITE | 281 | 1967 | | 1 (0)| 00:00:01 |
    | 59 | NESTED LOOPS | | 95 | 9500 | | 3189 (2)| 00:00:39 |
    |* 60 | HASH JOIN | | 96 | 8736 | 4440K| 3093 (2)| 00:00:38 |
    |* 61 | HASH JOIN | | 56789 | 3771K| | 1679 (2)| 00:00:21 |
    |* 62 | HASH JOIN | | 2894 | 178K| | 1273 (1)| 00:00:16 |
    | 63 | INDEX FULL SCAN | XPKSTOCK_EQUIPMENT_ATTRIB_VAL | 42 | 294 | | 1 (0)| 00:00:01 |
    |* 64 | HASH JOIN | | 2894 | 158K| | 1271 (1)| 00:00:16 |
    | 65 | TABLE ACCESS FULL | STOCK_EQUIPMENT | 42 | 252 | | 3 (0)| 00:00:01 |
    |* 66 | TABLE ACCESS BY INDEX ROWID| EQUIPMENT_CONFIGURATION | 1279 | 53718 | | 1265 (1)| 00:00:16 |
    | 67 | NESTED LOOPS | | 1860 | 93000 | | 1268 (1)| 00:00:16 |
    |* 68 | TABLE ACCESS FULL | EQUIPMENT_STATUS | 1 | 8 | | 3 (0)| 00:00:01 |
    |* 69 | INDEX RANGE SCAN | XIF3EQUIPMENT_CONFIGURATION | 23796 | | | 48 (3)| 00:00:01 |
    | 70 | INDEX FAST FULL SCAN | PK_EQUIPMENT_CONFIGURATION | 380K| 1859K| | 398 (3)| 00:00:05 |
    |* 71 | TABLE ACCESS FULL | EQUIPMENT_ATTRIBUTE_VALUE | 242K| 5451K| | 785 (3)| 00:00:10 |
    | 72 | TABLE ACCESS BY INDEX ROWID | LOCATION | 1 | 9 | | 1 (0)| 00:00:01 |
    |* 73 | INDEX UNIQUE SCAN | PK_LOCATION | 1 | | | 0 (0)| 00:00:01 |
    | 74 | TABLE ACCESS FULL | GAMESET | 825 | 8250 | | 5 (0)| 00:00:01 |
    | 75 | SORT AGGREGATE | | 1 | 6 | | | |
    | 76 | NESTED LOOPS | | 1 | 6 | | 0 (0)| 00:00:01 |
    |* 77 | INDEX UNIQUE SCAN | XPKSTOCK_EQUIPMENT | 1 | 3 | | 0 (0)| 00:00:01 |
    |* 78 | INDEX RANGE SCAN | XIF1STOCK_EQUIPMENT_ATTRIB_VAL | 1 | 3 | | 0 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    3 - filter(COUNT("MODEL_ATTRIBUTE_VALUE_ID")= (SELECT COUNT(*) FROM "STOCK_EQUIPMENT_ATTRIB_VALUE"
    "STOCK_EQUIPMENT_ATTRIB_VALUE","STOCK_EQUIPMENT" "STOCK_EQUIPMENT" WHERE "STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"=:B1 AND
    "STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID" AND
    "STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID"=:B2))
    5 - access("SE"."STOCK_EQUIPMENT_ID"="VSDEIH"."STOCK_EQUIPMENT_ID")
    6 - access("SE"."MODEL_ID"="M"."MODEL_ID")
    11 - access("GS"."GAME_WARE_ID"="GW"."GAME_WARE_ID"(+))
    13 - access("EC"."GAMESET_ID"="GS"."GAMESET_ID"(+))
    14 - access("S"."SITE_TYPE_ID"="ST"."SITE_TYPE_ID")
    16 - access("L"."SITE_ID"="S"."SITE_ID")
    18 - access(ROWID=ROWID)
    22 - access("MODEL_ATTRIBUTE_VALUE_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."MODEL_ATTRIBUTE_VALUE_ID" AND
    "EC"."EQUIPMENT_ID"="EAV"."EQUIPMENT_ID")
    filter("EAV"."START_DATE">="EC"."START_DATE" AND ("EAV"."END_DATE" IS NULL AND "EC"."END_DATE">="EAV"."START_DATE" OR
    "EC"."END_DATE" IS NULL OR "EAV"."END_DATE"<="EC"."END_DATE") OR "EC"."START_DATE">="EAV"."START_DATE" AND ("EC"."END_DATE"
    IS NULL AND "EAV"."END_DATE">="EC"."START_DATE" OR "EAV"."END_DATE" IS NULL OR "EC"."END_DATE"<="EAV"."END_DATE"))
    23 - access("EC"."EQUIPMENT_ID"="EC"."EQUIPMENT_ID")
    24 - access("STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID")
    26 - access("EC"."MODEL_ID"="STOCK_EQUIPMENT"."MODEL_ID")
    28 - filter("EC"."END_DATE" IS NULL)
    30 - filter("ES"."EQUIPMENT_STATUS_CODE"='ALL')
    31 - access("EC"."EQUIPMENT_STATUS_ID"="ES"."EQUIPMENT_STATUS_ID")
    33 - filter("EAV"."END_DATE" IS NULL)
    35 - access("EC"."LOCATION_ID"="L"."LOCATION_ID")
    39 - access("STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"=:B1)
    40 - access("STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID")
    filter("STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID"=:B1)
    41 - filter(COUNT("MODEL_ATTRIBUTE_VALUE_ID")= (SELECT COUNT(*) FROM "STOCK_EQUIPMENT_ATTRIB_VALUE"
    "STOCK_EQUIPMENT_ATTRIB_VALUE","STOCK_EQUIPMENT" "STOCK_EQUIPMENT" WHERE "STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"=:B1 AND
    "STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID" AND
    "STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID"=:B2))
    43 - access("SE"."STOCK_EQUIPMENT_ID"="VSDEIH"."STOCK_EQUIPMENT_ID")
    44 - access("SE"."MODEL_ID"="M"."MODEL_ID")
    49 - access("GS"."GAME_WARE_ID"="GW"."GAME_WARE_ID"(+))
    51 - access("EC"."GAMESET_ID"="GS"."GAMESET_ID"(+))
    52 - access("S"."SITE_TYPE_ID"="ST"."SITE_TYPE_ID")
    54 - access("L"."SITE_ID"="S"."SITE_ID")
    56 - access(ROWID=ROWID)
    60 - access("MODEL_ATTRIBUTE_VALUE_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."MODEL_ATTRIBUTE_VALUE_ID" AND
    "EC"."EQUIPMENT_ID"="EAV"."EQUIPMENT_ID")
    filter("EAV"."START_DATE">="EC"."START_DATE" AND ("EAV"."END_DATE" IS NULL AND "EC"."END_DATE">="EAV"."START_DATE" OR
    "EC"."END_DATE" IS NULL OR "EAV"."END_DATE"<="EC"."END_DATE") OR "EC"."START_DATE">="EAV"."START_DATE" AND ("EC"."END_DATE"
    IS NULL AND "EAV"."END_DATE">="EC"."START_DATE" OR "EAV"."END_DATE" IS NULL OR "EC"."END_DATE"<="EAV"."END_DATE"))
    61 - access("EC"."EQUIPMENT_ID"="EC"."EQUIPMENT_ID")
    62 - access("STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID")
    64 - access("EC"."MODEL_ID"="STOCK_EQUIPMENT"."MODEL_ID")
    66 - filter("EC"."END_DATE" IS NULL)
    68 - filter("ES"."EQUIPMENT_STATUS_CODE"='AVA')
    69 - access("EC"."EQUIPMENT_STATUS_ID"="ES"."EQUIPMENT_STATUS_ID")
    71 - filter("EAV"."END_DATE" IS NULL)
    73 - access("EC"."LOCATION_ID"="L"."LOCATION_ID")
    77 - access("STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"=:B1)
    78 - access("STOCK_EQUIPMENT"."STOCK_EQUIPMENT_ID"="STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID")
    filter("STOCK_EQUIPMENT_ATTRIB_VALUE"."STOCK_EQUIPMENT_ID"=:B1)
    5 minutes reduced to 7 seconds.!!
    THE QUESTION.
    Which (and where) query hint do I use to get the FIRST query to use the execution plan "method" of the second -
    IE: To still perform well when a IN-LIST is used instead of EQUALS.
    Technical:
    Oracle 10.2.0.2 EE on Solaris 8, 64 bit.
    Please help.
    Thank you.
    Below is the code of the referenced views for clarity.
    CREATE OR REPLACE FORCE VIEW etrak.v_stocked_equipment_inven_his (stock_equipment_id,
    equipment_id,
    model_id,
    gameset_id,
    gameset_is_active,
    game_ware_id,
    game_ware_is_active,
    equipment_status_code,
    ec_start_date,
    ec_end_date,
    eav_start_date,
    eav_end_date,
    model_attribute_value_id,
    site_id,
    is_store
    AS
    SELECT DISTINCT stock_equipment_id, equipment_id, model_id, gameset_id,
    gameset_is_active, game_ware_id, game_ware_is_active,
    equipment_status_code, ec_start_date, ec_end_date,
    eav_start_date, eav_end_date, model_attribute_value_id,
    site_id, is_store
    FROM (SELECT stock_equipment_id, equipment_id, model_id,
    gameset_id, gameset_is_active, game_ware_id,
    game_ware_is_active, equipment_status_code,
    ec_start_date, ec_end_date, eav_start_date,
    eav_end_date, model_attribute_value_id, site_id,
    is_store
    FROM (SELECT DISTINCT equipment_id, model_id,
    gameset_id, gameset_is_active,
    game_ware_id, game_ware_is_active,
    equipment_status_code,
    model_attribute_value_id,
    ec_start_date, ec_end_date,
    eav_start_date, eav_end_date,
    site_id, is_store
    FROM (SELECT ec.equipment_id,
    ec.model_id,
    gs.gameset_id,
    gs.active_flag
    AS gameset_is_active,
    gw.game_ware_id,
    gw.active_flag
    AS game_ware_is_active,
    es.equipment_status_code,
    ec.start_date
    AS ec_start_date,
    ec.end_date
    AS ec_end_date,
    l.site_id, st.is_store
    FROM equipment_configuration ec,
    equipment_status es,
    LOCATION l,
    site s,
    site_type st,
    gameset gs,
    game_ware gw
    WHERE ec.equipment_status_id =
    es.equipment_status_id
    AND ec.gameset_id = gs.gameset_id(+)
    AND gs.game_ware_id = gw.game_ware_id(+)
    AND ec.location_id =
    l.location_id
    AND l.site_id = s.site_id
    AND s.site_type_id =
    st.site_type_id)
    JOIN
    (SELECT ec.equipment_id,
    model_attribute_value_id,
    eav.start_date
    AS eav_start_date,
    eav.end_date
    AS eav_end_date
    FROM equipment_configuration ec,
    equipment_attribute_value eav
    WHERE ec.equipment_id =
    eav.equipment_id)
    USING (equipment_id)
    WHERE ( eav_start_date >=
    ec_start_date
    AND ( ( eav_end_date IS NULL
    AND ec_end_date >=
    eav_start_date
    OR ec_end_date IS NULL
    OR eav_end_date <=
    ec_end_date
    OR ( ec_start_date >=
    eav_start_date
    AND ( ( ec_end_date IS NULL
    AND eav_end_date >=
    ec_start_date
    OR eav_end_date IS NULL
    OR ec_end_date <=
    eav_end_date
    JOIN
    (SELECT stock_equipment_id, model_id,
    model_attribute_value_id
    FROM stock_equipment JOIN stock_equipment_attrib_value
    USING (stock_equipment_id)
    ) USING (model_id,
    model_attribute_value_id)
    CREATE OR REPLACE FORCE VIEW etrak.v_stock_equipment_mod_man_list (stock_equipment_id,
    stock_equipment_code,
    model_id,
    model_name,
    model_type_id,
    model_type_code,
    model_type_name,
    man_id,
    man_name
    AS
    SELECT se.stock_equipment_id, se.stock_equipment_code, m.model_id,
    m.model_name, mt.model_type_id, mt.model_type_code,
    mt.model_type_name, ma.man_id, ma.man_name
    FROM stock_equipment se, model m, model_type mt, manufacturer ma
    WHERE se.model_id = m.model_id
    AND m.model_type_id = mt.model_type_id
    AND m.man_id = ma.man_id;

    What also makes it difficult to read is the lack of formatting tags ([code][/code] or [pre][/pre]) so that we can actually read the code and execution plans.
    I'm not going to trawl through formatting all that myself just to try and see what the differences are between query 1 and query 2.
    Also bear in mind that when query 2 ran, the data may have been cached and so there is less physical I/O required.
    You don't really want to use any hints to cause re-use of execution plans from 1 query to a different query (like I said, I don't know how different they are). What you want to do is determine what poor SQL coding is making the first query slow and fix it.

  • Query hint to force SQL to use a temporary table in a CTE query?

    Hi,
    is it possible to tell SQL Server to create a temporary table by itself when I'm using a CTE in my query?
    I have a query starting with a CTE where I group by my record, then another recursive CTE use the first CTE and finally my select statement like:
    with cte as (select a,b,c,row_number() ...  from mytable group by a,b,c)
    , cte2(select .... from cte A where rownum =1
    union all select ... from cte B inner join cte2 C on ......
    select * from cte2
    this query is very very slow, but if I store the first CTE into a temporary table and then cte2 consume my temp table rather than the CTE, the query is very fast.
    creating the temp table took 10sec and the select took 20sec
    while the initial query didnt return anything  after 2minutes!!!
    so what can I try to do to have the query running in less than 30sec without creating the temp table first?
    is there a query hint which can be used to tell SQL Server to convert the CTE into a temp table?
    as I have a lot of query to manage, I want to simplify my model without relying in temporary tables every time I suffer this issue...
    thanks.

    What is your SQL Server version?
    There is no hint to materialize results of cte into a temp table, so the solution you tried is the best you can have.
    I think the idea of materializing CTE into a temp table was already proposed on Connect. Try searching for this and vote.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Oracle query hints in JPQL - is it possible?

    Sorry, posted to wrong forum... I don't know how to delete it - only edit...
    Hello,
    I am using Sun Java Application Server 9.1 (GlassFish), EJB 3.0 and JPA (TopLink). My database is Oracle.
    Is there any way to specify Oracle query hints (for example, /*+ rule */ in JPQL queries? Or the only way to do it is using native queries?
    Many thanks in advance
    Edited by: Troff_2 on Nov 27, 2007 5:50 AM

    Yes.It is possible.Only need to modify the view for order tracker query need to change.
    You can use decode statement in the query to add status as Processing .
    Please refer the IBE_ORDER_SUM_V view for details.
    Eg:
    decode(oel.meaning,'Booked',"Processing",oel.meaning) from
    oe_lookups        
    oel,

  • How to use hints in Obiee to increase performance

    Anybody please tell me how can we use hints to increase performance of ad hoc and dashboard reports in obiee

    Hi,
    Check this,
    http://www.howtoexam.com/index.php?option=com_content&view=article&id=75%3Ausing-hints-in-obiee-rpd-and-answers&catid=790%3Acomputers-and-software&Itemid=166
    Rgds,
    Dpka

  • Physical query issued by Obiee when cache is on is different and slow

    When the same report runs in OBIEE 10g and cache is OFF it takes less then 1min to get results. If cache is turned ON physical query issued by Obiee is totally different and it takes 2h to get results. Has anyone experienced this with having cache on that some queries are performing poorly.
    Thanks,
    Tatjana

    We are using BI Apps Order Management and Fulfillment Analytics and all tables are cached anyway. Dimensions used are not that huge up to 40K rows. What should I check when it comes to DB query? As I said is different than one generated when cache is disabled although both have the almost the explain plan.

  • Parallel query hint with stored outlines

    Hi,
    Can I use parallel query hint with stored outlines.
    Regards
    MMU

    I'm not quite sure what you're asking, since stored outlines themselves implement hints to try to maintain plan stability.
    If you're asking if stored outlines will utililze the parallel query hints I'd have to assume "yes" but would test the idea anyway.
    Message was edited by:
    riedelme

  • Query hint no_push_pred

    Hi,
    I want to prevent oracle to do a VIEW PUSHED PREDICATE, because it slows down my query.
    I know that adding query hints is not a good practice, anyway, I wonder why the hint /*+ NO_PUSH_PRED +*/ doesn't remove the VIEW PUSHED PREDICATE from my plan.
    Do I always have to specify an alias /*+ NO_PUSH_PRED(TABLE_1) +*/ to get that working correctly?
    Thanks!

    Hi,
    the hint can be used with or without an argument, but it has to be placed correctly, see http://docs.oracle.com/cd/B12037_01/server.101/b10752/hintsref.htm#6195
    Also, the second "+" is redundant (i.e. /*+ NO_PUSH_PRED */ => /* NO_PUSH_PRED */ ).
    If it doesn't resolve your issue, please post the text of the query.
    Best regards,
    Nikolay

  • Use query hints to build the aggregate views

    can i get a link on this information
    and wherr can i find out about Aggregated design wizard that helps create aggregation scripts
    thanks
    Edited by: Next Level on Jul 8, 2012 6:10 AM

    Try
    Look for Query Hints - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_dbag/alocare.html#alocare1073704
    Probably worth reading
    Aggregating an Aggregate Storage Database - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_dbag/alocare.html#alocare1078558
    EAS documentation
    Query Hints http://docs.oracle.com/cd/E17236_01/epm.1112/eas_help/queryhints.html
    Aggregation Design Wizard - http://docs.oracle.com/cd/E17236_01/epm.1112/eas_help/dbwzagg.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Parallel hint in OBIEE 11g

    Dear All,
    I am new to OBIEE. Can any one tell me how to add parallel hint in 11g. Is Oracle BI Presentation Service ignores any DB Hint added to query while parsing. If yes, how to overcome this. We need to add parallel hint in few report to make things faster, i do not want to touch the table level hints as it is affecting my performance.
    I have gone through oracle doc ID 823193.1
    Thanks and Regards,
    Anand.

    Hi Jay,
    Thanks for your reply.
    can you please give a practical example by working in a sqlplus. I tried and got below error. Please help.
    SQL>  select * from t;
             N
             1
    SQL>  select n from t;
             N
             1
    SQL> select /*+PARALLEL (t,2)*/ n from t;
             N
             1
    SQL>  select EVALUATE('/*+PARALLEL (t,2)*/',t."n") from t;
    select EVALUATE('/*+PARALLEL (t,2)*/',t."n") from t
    ERROR at line 1:
    ORA-00904: "T"."n": invalid identifierRegards,
    Anand.

  • Difference in Query generated by OBIEE for same report

    Hi,
    I am using a a report(X) in a filter condition.
    I am seeing a peculiar issue with OBIEE server. When i am running a report(X) alone, the query generated is different. But when i am using the same report in filter condition of other report(Y), the same report is generating some other query. The first report(X) is running fine but the second(Y) is not running at all.
    Case 1(Report X) Query: The report is breaking into 3 parts for different fact tables and combining the data to give result.
    Case 2(Report Y): A single query is being formed and within it is fecthing the data from different fact tables using subqueries.
    Case2 is creating a lot of problem as the performance is totally poor.
    Any suggesstions??
    Thanks
    Tataji

    Hi, we haven't debugged the application or traced the query against the production server (it's in our customer's office) buy I think there's no difference since the query itself has been tested using sqldeveloper against both servers (XE 11.2 and Enterprise 11.1) and the behavior is consistent. By consistent I mean:
    - The query executed via sqldeveloper against Oracle XE 11.2 runs ok and so does the application.
    - The query executed via sqldeveloper against Oracle Enterprise 11.1 fails with an ORA-01790 error, and so does the application (exceptions are being logged in the Event Log).
    To sum up: the same query runs ok in Oracle XE 11.2 and fails in Oracle Enterprise 11.1.
    Additional information: we have tried explicit casting the NULL literals to the corresponding data types (in the UNION ALLs) and the query works fine in both versions. ¿Is there an option in ODAC to tell the query generator to write this explicit castings?
    Regarding the DB schema and the LINQ query, I'll be sending them asap.
    Regards,
    Ernesto.

  • How to set up Query Logging in OBIEE 11g 11.1.1.6

    Hi all,
    I couldn't find the option for setting up the query logging for testing and debugging purpose. Could anyone plz help me in this ...
    Regards,
    Arun

    Hi Arun,
    For simplicity I'll direct you to a link http://obiee11gqna.blogspot.com.au/2011/04/obiee-11g-query-log-log-level.html
    Richard

  • Query hints in 10g

    Hello All-
    I am a database programmer who's attempting to understand how 10g handles hints within the CBO. Our applications have run with the RBO and will be migrating to 10g next year. I understand that the RBO will no longer be supported so I would assume that hints are now ignored, but in testing it does not appear that way (mostly queries using the APPEND hint are running much slower). Does anyone know how Oracle 10g handles hints embedded in packaged queries now?
    Thanks for your help!

    I am not gathering statistics in 9i. In addition, I setup 2 new machines (hardware and setup identical) and installed 9i on one and 10g on the other. The only difference is obviously the optimizer mode and the other parameters (I let Oracle decide these and have not modified them). When I look at a query that performed differently between the 2 versions, the explain plans are the same, yet the execution time is drastically different (1 minute on 9i versus 10 minutes on 10g- using the same data set and load).
    Do you think the differences could be attributable to the other parameters (sort area size, shared pool size, etc.) or is there something inherent about the optimizer that I am missing?
    Thanks for much for your input,
    Amy

  • Re: View physical query issued by Obiee 11g

    Guys,
    I want to view the physical query generated by the report in OBIEE 11g, but in the logs, i can only see these queries: (Just writing the first line to illustrate)
    SELECT
    0 s_0,
    "Marketing Contact List"."- Account Address"."Billing Abode Name" s_1,
    And this query:
    RqList distinct
    0 as c1 GB,
    Account.Billing Abode Name as c2 GB,
    Both these queries are NOT the physical ones.
    I have the appropriate log level, and even set it manually from the front end, but I'm unable to view the physical query. Please help!

    A.Budd,
    After running a report in OBIEE, click the Administration Link in the top right corner. New window appears and select "Manage Sessions". Look for the latest time executed that applies to the time you executed your report and click View Logs. Scroll almost to the bottom of the log.
    What you are looking for is the generated logic that starts with "*With*"
    WITH
    SAWITH0 AS (select sum(T443244.AGING030) as c1,
    sum(T443244.AGING6190) as c2,
    sum(case when T443244.CURRENCYCODE = 'C
    Copy the whole logic from WITH to the end of the logic (typically ends with Order By) (not the log) and paste it in your query tool. This is based on the physical layer.
    Antexity

Maybe you are looking for

  • Can anyone tell me how I can fax a pdf from my Mac.

    When I go under print and then fax  pdf, I get a message saying I have no fax modem. I know this is a rudimentary question but I'm not mac savvy. How can I remedy this?

  • Cannot load windows 7 through bootcamp

    i have been trying to load windows 7 through bootcamp. but after the initial partition process, the screen goes blank with a cursor on the top left corner. it does not come to life even after 4 hours. i did not have any problem making the partition b

  • Problem syncing large photo library

    I have a iPad 64GB and cannot sync my iPhoto library of 7000 photos. It syncs then states then when I select the photos on the ipad it hands saying "updating library" then crashes. The library syncs fine to my iPhone and everything else seems to work

  • RFC Adapter for multiple clients

    Hi All I have a situation where we have a Dev client (030) and a Test client (041) on our SAP Dev system. We are implementing an XI interface with a non-SAP system that also has a Dev and Test environment.  Up to now the interface has only needed to

  • HP 2010i monitor- Flickering after coming out of hibernation

    When I turn the monitor on, or wake the monitor back up after it has gone to sleep, the screen flickers for a minute or so, gradually lessens, then stops flickering. It appears to be the backlight leds flickering around the perimeter of the screen (m