HomeArticlesSlideshowsAsk BobLogin or Register
NewsCustom SearchContactLinks
Lazy hint - go faster for bulk processing in Oracle
ORACLE STUFFS
24-Aug-2015
Following an example of politicians, we add a tax to index usage to stimulate hash processing using a hint:
/*+ OPT_PARAM('optimizer_index_cost_adj', 30000)*/

SELECT /*+ OPT_PARAM('optimizer_index_cost_adj', 300000) */ 
       TO_NUMBER(TO_CHAR(TO_DATE(crd.CURRENT_DATE_INS), 'J'))   AS TIME_KEY
     , tcd.BTCNTRDET_SOURCE_CODE || '|' || tcd.BTCNTRDET_ID ||
       '|' || mst.TCNTRBLTP_CODE || '|' || v_CDICA.CURR_CODE   AS MTCNTRD_ID
     , v_CDICA.BTCNTRDET_KEY         AS BTCNTRDET_KEY
     , mst.TCNTRBLTP_CODE             AS TCNTRBLTP_CODE
...

Ludek Bob Jankovsky
All Right Reserved © 2007, Designed by Bob Jankovsky