Optimizer in Oracle 10

Hi all,
I am trying to tune some statements that worked fine in Oracle 9 and are a pain in Oracle 10.
I have one big select (200 rows) that joins a hand full of tables (each with 80thousand or so records, one is bigger). The execution plan for this select looks fine, data is returned in a reasonable time (some seconds). The estimated cost is okay (5 digits long).
If I take this same select and put an "insert into target_table (...) as" before it, the execution plan looks totally different. In Oracle 9 the execution plan looks the same with the "insert into target_table (...) as" and the cost is also the same. But in Oracle 10 the cost has 13 digits ... and it does not finish within days.
The execution plan for the select only uses many hash joins; with the insert wrapped around a lot of them are replaced with nested loops. I am a noob in reading execution plans, but even I can see that the system is approaching this totally differently.
Why is the optimizer calculating a totally different execution plan if it pulls the data for inserting instead of a simple select?
As a workaround, I will probably save the stuff in a materialized view ... but still I am curious why this is happening.
Best regards,
Steff
PS: I tried hints (APPEND and ALL_ROWS) but it did not change the execution plan to a better result; it looks different, but has the same horrifying cost and does not return within a few minutes either.

Hi,
I somehow forgot about this issue, but I'm still curious what the reason is behind this ...
Good plan when creating ... :
Operation     Object Name     Rows     Bytes     Cost     Object Node     In/Out     PStart     PStop
CREATE TABLE STATEMENT Optimizer Mode=ALL_ROWS          48 K           11681                                          
  LOAD AS SELECT     WINA_BESITZER.TEST_ODAP_BTSSM                                                           
    VIEW     WINA_BESITZER.V_ODAP_BTSSM     48 K     17 M     11089                                          
      HASH UNIQUE          48 K     19 M     10422                                          
        NESTED LOOPS OUTER          48 K     19 M     6024                                          
          HASH JOIN RIGHT OUTER          48 K     18 M     6024                                          
            VIEW          355       26 K     920                                          
              MERGE JOIN          355       35 K     918                                          
                TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.AUFBAUZUSTAND     6       114       2                                          
                  INDEX FULL SCAN     WINA_BESITZER.AZST_PK     6             1                                          
                SORT JOIN          355       28 K     916                                          
                  TABLE ACCESS FULL     WINA_BESITZER.FE_BTS_SM     355       28 K     915                                          
            HASH JOIN RIGHT OUTER          48 K     15 M     5103                                          
              VIEW          14       896       1122                                          
                HASH JOIN          14       1 K     1121                                          
                  VIEW     SYS.VW_SQ_1     1 K     33 K     222                                          
                    HASH GROUP BY          1 K     45 K     220                                          
                      INDEX FAST FULL SCAN     WINA_BESITZER.IDX_FESM_01     1 K     46 K     219                                          
                  MERGE JOIN          1 K     137 K     899                                          
                    TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.AUFBAUZUSTAND     6       114       2                                          
                      INDEX FULL SCAN     WINA_BESITZER.AZST_PK     6             1                                          
                    SORT JOIN          1 K     107 K     897                                          
                      TABLE ACCESS FULL     WINA_BESITZER.FE_BTS_SM     1 K     107 K     896                                          
              HASH JOIN RIGHT OUTER          48 K     12 M     3980                                          
                VIEW     WINA_BESITZER.V_MANAGING_OMC_B     1       15       12                                          
                  NESTED LOOPS OUTER          1       105       11                                          
                    NESTED LOOPS          1       79       7                                          
                      NESTED LOOPS          1       58       5                                          
                        NESTED LOOPS          1       53       4                                          
                          INDEX FAST FULL SCAN     WINA_BESITZER.IDX_FOMC_01     1       24       2                                          
                          TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       29       2                                          
                            INDEX UNIQUE SCAN     WINA_BESITZER.IDX_FE_04     1             1                                          
                        INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       5       1                                          
                      INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_11     1       21       2                                          
                    VIEW PUSHED PREDICATE          1       26       4                                          
                      NESTED LOOPS          1       63       3                                          
                        TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       28       3                                          
                          INDEX UNIQUE SCAN     WINA_BESITZER.FE_PK     1             2                                          
                        TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_NE_KLASSE_VIP     1       35       0                                          
                          INDEX RANGE SCAN     WINA_BESITZER.FNKV_FE_FK_I     1             0                                          
                HASH JOIN RIGHT OUTER          48 K     11 M     3967                                          
                  VIEW     WINA_BESITZER.V_BTSSM_PARENT_BSC_B     1       21       53                                          
                    HASH UNIQUE          1       153       52                                          
                      NESTED LOOPS OUTER          1       153       51                                          
                        NESTED LOOPS          1       127       50                                          
                          NESTED LOOPS OUTER          1       101       48                                          
                            NESTED LOOPS          1       75       47                                          
                              HASH JOIN          19       798       9                                          
                                INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_11     186       3 K     3                                          
                                INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_11     719       14 K     5                                          
                              TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       33       2                                          
                                INDEX UNIQUE SCAN     WINA_BESITZER.IDX_FE_04     1             1                                          
                            INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       26       1                                          
                          TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       26       2                                          
                            INDEX UNIQUE SCAN     WINA_BESITZER.FE_PK     1             1                                          
                        INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       26       1                                          
                  HASH JOIN RIGHT OUTER          48 K     10 M     3913                                          
                    VIEW     WINA_BESITZER.V_MANAGING_OMC_P     1       15       13                                          
                      NESTED LOOPS OUTER          1       115       12                                          
                        NESTED LOOPS          1       89       8                                          
                          NESTED LOOPS          1       58       5                                          
                            NESTED LOOPS          1       53       4                                          
                              INDEX FAST FULL SCAN     WINA_BESITZER.IDX_FOMC_01     1       24       2                                          
                              TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       29       2                                          
                                INDEX UNIQUE SCAN     WINA_BESITZER.IDX_FE_04     1             1                                          
                            INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       5       1                                          
                          TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.BEZIEHUNG     1       31       3                                          
                            INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_03     1             2                                          
                        VIEW PUSHED PREDICATE          1       26       4                                          
                          NESTED LOOPS          1       63       3                                          
                            TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       28       3                                          
                              INDEX UNIQUE SCAN     WINA_BESITZER.FE_PK     1             2                                          
                            TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_NE_KLASSE_VIP     1       35       0                                          
                              INDEX RANGE SCAN     WINA_BESITZER.FNKV_FE_FK_I     1             0                                          
                    HASH JOIN RIGHT OUTER          48 K     9 M     3900                                          
                      VIEW     WINA_BESITZER.V_BTSSM_PARENT_BSC_P     1       21       68                                          
                        HASH UNIQUE          1       173       67                                          
                          NESTED LOOPS OUTER          1       173       66                                          
                            NESTED LOOPS          1       147       65                                          
                              NESTED LOOPS OUTER          1       121       63                                          
                                NESTED LOOPS          1       95       62                                          
                                  HASH JOIN          19       1 K     24                                          
                                    INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_12     186       5 K     6                                          
                                    INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_12     719       21 K     18                                          
                                  TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       33       2                                          
                                    INDEX UNIQUE SCAN     WINA_BESITZER.IDX_FE_04     1             1                                          
                                INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       26       1                                          
                              TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       26       2                                          
                                INDEX UNIQUE SCAN     WINA_BESITZER.FE_PK     1             1                                          
                            INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       26       1                                          
                      HASH JOIN          48 K     8 M     3831                                          
                        INDEX FAST FULL SCAN     WINA_BESITZER.IDX_STO_01     64 K     1 M     97                                          
                        HASH JOIN RIGHT OUTER          48 K     7 M     3205                                          
                          TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_NE_TYP     238       8 K     11                                          
                            INDEX RANGE SCAN     WINA_BESITZER.FNT_IDX_STATUSDATES     8             6                                          
                          HASH JOIN RIGHT OUTER          48 K     5 M     3193                                          
                            TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_NE_KLASSE     1 K     28 K     16                                          
                              INDEX RANGE SCAN     WINA_BESITZER.FNK_IDX_DATES     39             10                                          
                            HASH JOIN RIGHT OUTER          48 K     4 M     3177                                          
                              TABLE ACCESS FULL     WINA_BESITZER.SYSTEM_HERSTELLER     171       2 K     3                                          
                              HASH JOIN RIGHT OUTER          48 K     4 M     3173                                          
                                INDEX FULL SCAN     WINA_BESITZER.IDX_NL_02     12       72       1                                          
                                HASH JOIN          48 K     4 M     3171                                          
                                  TABLE ACCESS FULL     WINA_BESITZER.NETZWERK     7       63       3                                          
                                  TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     48 K     3 M     3166                                          
                                    NESTED LOOPS          48 K     3 M     3167                                          
                                      INDEX RANGE SCAN     WINA_BESITZER.IDX_FET_01     1       11       1                                          
                                      INDEX RANGE SCAN     WINA_BESITZER.FE_FET_FK_I     48 K           41                                          
          TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.SW_VERSION     1       18       0                                          
            INDEX UNIQUE SCAN     WINA_BESITZER.SWV_PK     1             0                                           Bad plan when inserting:
Operation     Object Name     Rows     Bytes     Cost     Object Node     In/Out     PStart     PStop
INSERT STATEMENT Optimizer Mode=ALL_ROWS          48 K           12 M                                        
  VIEW     WINA_BESITZER.V_ODAP_BTSSM     48 K     16 M     12 M                                        
    SORT UNIQUE          48 K     26 M     12 M                                        
      HASH JOIN RIGHT OUTER          48 K     26 M     12 M                                        
        TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_NE_KLASSE     1 K     28 K     16                                          
          INDEX RANGE SCAN     WINA_BESITZER.FNK_IDX_DATES     39             10                                          
        NESTED LOOPS OUTER          48 K     25 M     12 M                                        
          HASH JOIN RIGHT OUTER          48 K     25 M     12 M                                        
            TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_NE_TYP     238       8 K     11                                          
              INDEX RANGE SCAN     WINA_BESITZER.FNT_IDX_STATUSDATES     8             6                                          
            HASH JOIN RIGHT OUTER          48 K     23 M     12 M                                        
              TABLE ACCESS FULL     WINA_BESITZER.SYSTEM_HERSTELLER     171       2 K     3                                          
              HASH JOIN          48 K     22 M     12 M                                        
                TABLE ACCESS FULL     WINA_BESITZER.NETZWERK     7       63       3                                          
                HASH JOIN          48 K     22 M     12 M                                        
                  INDEX FAST FULL SCAN     WINA_BESITZER.IDX_STO_01     64 K     1 M     97                                          
                  HASH JOIN RIGHT OUTER          48 K     20 M     12 M                                        
                    INDEX FULL SCAN     WINA_BESITZER.IDX_NL_02     12       72       1                                          
                    NESTED LOOPS OUTER          48 K     20 M     12 M                                        
                      NESTED LOOPS OUTER          48 K     19 M     11 M                                        
                        HASH JOIN RIGHT OUTER          48 K     19 M     11 M                                        
                          VIEW     WINA_BESITZER.V_BTSSM_PARENT_BSC_P     1       30       67                                          
                            SORT UNIQUE          1       173       67                                          
                              NESTED LOOPS OUTER          1       173       66                                          
                                NESTED LOOPS          1       147       65                                          
                                  NESTED LOOPS OUTER          1       121       63                                          
                                    NESTED LOOPS          1       95       62                                          
                                      HASH JOIN          19       1 K     24                                          
                                        INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_12     186       5 K     6                                          
                                        INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_12     719       21 K     18                                          
                                      TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       33       2                                          
                                        INDEX UNIQUE SCAN     WINA_BESITZER.IDX_FE_04     1             1                                          
                                    INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       26       1                                          
                                  TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       26       2                                          
                                    INDEX UNIQUE SCAN     WINA_BESITZER.FE_PK     1             1                                          
                                INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       26       1                                          
                          HASH JOIN RIGHT OUTER          48 K     17 M     11 M                                        
                            VIEW     WINA_BESITZER.V_BTSSM_PARENT_BSC_B     1       30       52                                          
                              SORT UNIQUE          1       153       52                                          
                                NESTED LOOPS OUTER          1       153       51                                          
                                  NESTED LOOPS          1       127       50                                          
                                    NESTED LOOPS OUTER          1       101       48                                          
                                      NESTED LOOPS          1       75       47                                          
                                        HASH JOIN          19       798       9                                          
                                          INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_11     186       3 K     3                                          
                                          INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_11     719       14 K     5                                          
                                        TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       33       2                                          
                                          INDEX UNIQUE SCAN     WINA_BESITZER.IDX_FE_04     1             1                                          
                                      INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       26       1                                          
                                    TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       26       2                                          
                                      INDEX UNIQUE SCAN     WINA_BESITZER.FE_PK     1             1                                          
                                  INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       26       1                                          
                            NESTED LOOPS OUTER          48 K     16 M     11 M                                        
                              NESTED LOOPS OUTER          48 K     10 M     196170                                          
                                NESTED LOOPS          48 K     4 M     3167                                          
                                  INDEX RANGE SCAN     WINA_BESITZER.IDX_FET_01     1       11       1                                          
                                  TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     48 K     3 M     3166                                          
                                    INDEX RANGE SCAN     WINA_BESITZER.FE_FET_FK_I     48 K           41                                          
                                VIEW PUSHED PREDICATE          1       139       4                                          
                                  NESTED LOOPS          1       107       4                                          
                                    TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_BTS_SM     1       88       3                                          
                                      INDEX RANGE SCAN     WINA_BESITZER.IDX_FESM_01     1             2                                          
                                    TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.AUFBAUZUSTAND     1       19       1                                          
                                      INDEX UNIQUE SCAN     WINA_BESITZER.AZST_PK     1             0                                          
                              VIEW PUSHED PREDICATE          1       126       225                                          
                                HASH JOIN          1       116       225                                          
                                  NESTED LOOPS          1       94       5                                          
                                    TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_BTS_SM     1       75       4                                          
                                      INDEX RANGE SCAN     WINA_BESITZER.IDX_FESM_01     1             3                                          
                                    TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.AUFBAUZUSTAND     1       19       1                                          
                                      INDEX UNIQUE SCAN     WINA_BESITZER.AZST_PK     1             0                                          
                                  VIEW     SYS.VW_SQ_1     1 K     33 K     220                                          
                                    SORT GROUP BY          1 K     45 K     220                                          
                                      INDEX FAST FULL SCAN     WINA_BESITZER.IDX_FESM_01     1 K     46 K     219                                          
                        VIEW PUSHED PREDICATE     WINA_BESITZER.V_MANAGING_OMC_B     1       16       10                                          
                          NESTED LOOPS OUTER          1       89       10                                          
                            NESTED LOOPS          1       85       7                                          
                              NESTED LOOPS          1       61       6                                          
                                NESTED LOOPS          1       56       5                                          
                                  INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_11     1       27       3                                          
                                  TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       29       2                                          
                                    INDEX UNIQUE SCAN     WINA_BESITZER.IDX_FE_04     1             1                                          
                                INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       5       1                                          
                              INDEX RANGE SCAN     WINA_BESITZER.IDX_FOMC_01     1       24       1                                          
                            VIEW PUSHED PREDICATE          1       4       3                                          
                              NESTED LOOPS          1       63       3                                          
                                TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       28       3                                          
                                  INDEX UNIQUE SCAN     WINA_BESITZER.FE_PK     1             2                                          
                                TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_NE_KLASSE_VIP     1       35       0                                          
                                  INDEX RANGE SCAN     WINA_BESITZER.FNKV_FE_FK_I     1             0                                          
                      VIEW PUSHED PREDICATE     WINA_BESITZER.V_MANAGING_OMC_P     1       16       11                                          
                        NESTED LOOPS OUTER          1       99       11                                          
                          NESTED LOOPS          1       95       8                                          
                            NESTED LOOPS          1       71       7                                          
                              NESTED LOOPS          1       66       6                                          
                                TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.BEZIEHUNG     1       37       4                                          
                                  INDEX RANGE SCAN     WINA_BESITZER.IDX_BZ_02     1             3                                          
                                TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       29       2                                          
                                  INDEX UNIQUE SCAN     WINA_BESITZER.IDX_FE_04     1             1                                          
                              INDEX RANGE SCAN     WINA_BESITZER.IDX_STO_01     1       5       1                                          
                            INDEX RANGE SCAN     WINA_BESITZER.IDX_FOMC_01     1       24       1                                          
                          VIEW PUSHED PREDICATE          1       4       3                                          
                            NESTED LOOPS          1       63       3                                          
                              TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FUNKTIONSEINHEIT     1       28       3                                          
                                INDEX UNIQUE SCAN     WINA_BESITZER.FE_PK     1             2                                          
                              TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.FE_NE_KLASSE_VIP     1       35       0                                          
                                INDEX RANGE SCAN     WINA_BESITZER.FNKV_FE_FK_I     1             0                                          
          TABLE ACCESS BY INDEX ROWID     WINA_BESITZER.SW_VERSION     1       18       0                                          
            INDEX UNIQUE SCAN     WINA_BESITZER.SWV_PK     1             0                                           Same statistics, same view ... totally different plan.

Similar Messages

  • Query optimization in Oracle 8i (tunning)

    Hi everyone,
    The following SQL statement use more than 15% of the CPU of the machine where it is executed. Please if somebody can help me to rewrite or hinting the query.
    This is the statement:
    SELECT
    /*+ INDEX(APD IDX_ABAPLANI_DET_SOL)  */ 
    apd.sinonimo,
    apd.sinonimo_planificacion,
    apd.cod_despensa,
    apd.estante_cod,
    apd.correlativo_solicitud,
    apd.prioridad,
    apd.correlativo_det_sol,
    apd.insumo_sinonimo,
    apd.cantidad_solicitada,
    apd.cantidad_despachada,
    apd.estado,
    apd.sinonimo_usuario,
    apd.sinonimo_observacion,
    ap.fecha_creacion,
    ap.centro_resultado,
    aud.nombre,
    aud.a_paterno,
    aud.rut,
    aud.username,
    cenres.cod_flex codigocr,
    insumo.cod_flex insumocod,
    cenres.des_flex despensa_descripcion,
    cenres.des_flex crdescripcion,
    insumo.des_flex insumodescripcion
    FROM
    aba_usuario_despachador aud,
    cenres,
    insumo,
    aba_planificacion_detalle apd,
    aba_planificacion ap
    WHERE ap.sinonimo = apd.sinonimo_planificacion
    AND aud.sinonimo = apd.sinonimo_usuario
    AND ap.centro_resultado = cenres.sinonimo
    AND insumo.sinonimo = apd.insumo_sinonimo
    AND apd.sinonimo_usuario = NVL (:b1, apd.sinonimo_usuario)
    AND apd.sinonimo_planificacion = NVL (:b2, apd.sinonimo_planificacion)
    AND apd.correlativo_solicitud = NVL (:b3, apd.correlativo_solicitud)
    AND apd.estante_cod = NVL (UPPER (:b4), apd.estante_cod)
    AND apd.cod_despensa = NVL (UPPER (:b5), apd.cod_despensa)
    AND apd.estado = NVL (:b6, apd.estado)
    AND ap.centro_resultado = NVL (:b7, ap.centro_resultado)
    AND TO_DATE (TO_CHAR (ap.fecha_creacion, 'dd/mm/yyyy'), 'dd/mm/yyyy')
    BETWEEN TO_DATE (NVL (:b8,TO_CHAR (ap.fecha_creacion, 'dd/mm/yyyy')),'dd/mm/yyyy')
    AND TO_DATE (NVL (:b9,TO_CHAR (ap.fecha_creacion, 'dd/mm/yyyy')),'dd/mm/yyyy')
    AND apd.estado NOT LIKE :b10
    ORDER BY apd.sinonimo;The version of the database is 8.1.7.4.0.
    Here is the output of EXPLAIN PLAN:
    Plan
    SELECT STATEMENT  CHOOSECost: 2,907  Bytes: 104,312  Cardinality: 472                                               
         32 SORT ORDER BY  Cost: 2,907  Bytes: 104,312  Cardinality: 472                                          
              31 CONCATENATION                                     
                   15 FILTER                                
                        14 NESTED LOOPS  Cost: 11  Bytes: 52,156  Cardinality: 236                           
                             11 NESTED LOOPS  Cost: 10  Bytes: 177  Cardinality: 1                      
                                  8 NESTED LOOPS  Cost: 9  Bytes: 133  Cardinality: 1                 
                                       5 NESTED LOOPS  Cost: 8  Bytes: 67  Cardinality: 1            
                                            2 TABLE ACCESS BY INDEX ROWID ADMABA.ABA_PLANIFICACION_DETALLE Cost: 7  Bytes: 52  Cardinality: 1       
                                                 1 INDEX FULL SCAN NON-UNIQUE ADMABA.IDX_ABAPLANI_DET_SOL Cost: 3  Cardinality: 1 
                                            4 TABLE ACCESS BY INDEX ROWID ADMABA.ABA_PLANIFICACION Cost: 1  Bytes: 15  Cardinality: 1       
                                                 3 INDEX UNIQUE SCAN UNIQUE ADMABA.PK_ABA_PLANIFICACION Cardinality: 1 
                                       7 TABLE ACCESS BY INDEX ROWID ADMABA.ABA_USUARIO_DESPACHADOR Cost: 1  Bytes: 3,498  Cardinality: 53            
                                            6 INDEX UNIQUE SCAN UNIQUE ADMABA.ABA_USUARIO_DESPACHADOR_PK Cardinality: 53       
                                  10 TABLE ACCESS BY INDEX ROWID OPS$NUCLEO.NUC_CODIGOS_FLEXIBLES Cost: 1  Bytes: 14,828  Cardinality: 337                 
                                       9 INDEX UNIQUE SCAN UNIQUE OPS$NUCLEO.NUC_CODFLEX_PK Cardinality: 337            
                             13 TABLE ACCESS BY INDEX ROWID OPS$NUCLEO.NUC_CODIGOS_FLEXIBLES Cost: 1  Bytes: 1.037.828  Cardinality: 23,587                      
                                  12 INDEX UNIQUE SCAN UNIQUE OPS$NUCLEO.NUC_CODFLEX_PK Cardinality: 23,587                 
                   30 FILTER                                
                        29 NESTED LOOPS  Cost: 11  Bytes: 52,156  Cardinality: 236                           
                             26 NESTED LOOPS  Cost: 10  Bytes: 177  Cardinality: 1                      
                                  23 NESTED LOOPS  Cost: 9  Bytes: 133  Cardinality: 1                 
                                       20 NESTED LOOPS  Cost: 8  Bytes: 67  Cardinality: 1            
                                            17 TABLE ACCESS BY INDEX ROWID ADMABA.ABA_PLANIFICACION_DETALLE Cost: 7  Bytes: 52  Cardinality: 1       
                                                 16 INDEX RANGE SCAN NON-UNIQUE ADMABA.IDX_ABAPLANI_DET_SOL Cost: 3  Cardinality: 1 
                                            19 TABLE ACCESS BY INDEX ROWID ADMABA.ABA_PLANIFICACION Cost: 1  Bytes: 15  Cardinality: 1       
                                                 18 INDEX UNIQUE SCAN UNIQUE ADMABA.PK_ABA_PLANIFICACION Cardinality: 1 
                                       22 TABLE ACCESS BY INDEX ROWID ADMABA.ABA_USUARIO_DESPACHADOR Cost: 1  Bytes: 3,498  Cardinality: 53            
                                            21 INDEX UNIQUE SCAN UNIQUE ADMABA.ABA_USUARIO_DESPACHADOR_PK Cardinality: 53       
                                  25 TABLE ACCESS BY INDEX ROWID OPS$NUCLEO.NUC_CODIGOS_FLEXIBLES Cost: 1  Bytes: 14,828  Cardinality: 337                 
                                       24 INDEX UNIQUE SCAN UNIQUE OPS$NUCLEO.NUC_CODFLEX_PK Cardinality: 337            
                             28 TABLE ACCESS BY INDEX ROWID OPS$NUCLEO.NUC_CODIGOS_FLEXIBLES Cost: 1  Bytes: 1.037.828  Cardinality: 23,587                      
                                  27 INDEX UNIQUE SCAN UNIQUE OPS$NUCLEO.NUC_CODFLEX_PK Cardinality: 23,587                 Thanks in advance!
    Edited by: user491853 on 21-ago-2012 15:29

    A few comments looking at your sql query:
    How much time the query is taking?
    How many rows are there in the tables?
    Make sure the stats are up-to-date.
    Please kindly follow the instructions provided by others as well.
    >
    The version of the database is 8.1.7.4.0
    >
    Suggestion: Upgrade your version. Oracle Cost Based Optimizer is more smarter now.Upgrading will make your life much more easier as there are so many enhancements.
    AND TO_DATE (TO_CHAR (ap.fecha_creacion, 'dd/mm/yyyy'), 'dd/mm/yyyy')
    BETWEEN TO_DATE (NVL (:b8,TO_CHAR (ap.fecha_creacion, 'dd/mm/yyyy')),'dd/mm/yyyy')
    AND TO_DATE (NVL (:b9,TO_CHAR (ap.fecha_creacion, 'dd/mm/yyyy')),'dd/mm/yyyy')Why are you using TO_DATE/TO_CHAR on a date column?
    AND ap.centro_resultado = NVL (:b7, ap.centro_resultado)the same can be rewritten as below:
    AND (ap.centro_resultado =:b7 and :b7 is not null) or :b7 is null This applies to other predicates you are using as well.
    The table used in the plan is not found in your sql query eg NUC_CODIGOS_FLEXIBLES.
    Regards
    Biju

  • How to use indexes correctly in oracle

    Hi guys
    on one table i have indexes on 3 columns in the following order
    a
    b
    c
    When i m writing a select statement in my where clause what should be the order? like
    where
    a='some value' and
    b='some value' and
    c='some value';
    or in reverse order like this
    c='some value' and
    b='some value' and
    a='some value';
    please let me know.
    Thanks

    If you have an index on a,b,c the difference in performance can be on the index order.
    If column "a" has only 2 unique values then the sub values of the index only has 50% of the remaining values, the cost optimizer on Oracle will probably skip the index as an index scan of 50% is slower than a full table scan.
    If a has 100 unique values then the remaining search is only on 1% of the values so is likely to be used.
    As with any optimisation try using
    explain plan for selec x,y,z from a_table
    from where
    a='some value' and
    b='some value' and
    c='some value'
    If the index is not being used firstly try
    analyze table estimate statistics
    sample 10 percent
    for all indexes
    for all indexed columns;
    and failing than try different orders in acceptance environment.

  • What are the new features of Oracle 10g over Oracle9i

    Hi Grus..
    i want to know what are the new features of oracle 10g over Oracle 9i as well oracle 11g over 10g.. can any one give me the detailed document.
    Because I'm struggling each and every time while the interviewer asked above question.
    It's very helpful for me if any one give me the detailed document regarding above question
    Thanks In Advance
    Arun
    Edited by: Arun on Oct 23, 2010 10:19 AM

    Hi,
    Just check below link..would be helpful..
    http://www.oracle.com/global/ap/openworld/ppt_download/database_manageability%2011g%20overview_230.pdf
    and
    Each release of Oracle has many differences, and Oracle 10g is a major re-write of the Oracle kernel from Oracle 9i. While there are several hundred new features and other differences between 9i and 10g, here are the major differences between Oracle9i and Oracle10g:
    Major changes to SQL optimizer internals
    Oracle Grid computing
    AWR and ASH tables incorporated into Oracle Performance Pack and Diagnostic Pack options
    Automated Session History (ASH) materializes the Oracle Wait Interface over time
    Data Pump replaces imp utility with impdp
    Automatic Database Diagnostic Monitor (ADDM)
    SQLTuning Advisor
    SQLAccess Advisor
    Rolling database upgrades (using Oracle10g RAC)
    dbms_scheduler package replaces dbms_job for scheduling
    and you need to refer oracle documentation for sql, plsql references where you will know particular enhancements made...
    thanks
    Prasanth
    Edited by: Onenessboy on Oct 23, 2010 10:22 AM

  • HINTS with CBO Optimizer?

    Hi Experts,
    First of all Merry Chrismas to all ...
    I am confusing in the area of HInts.. My question in that are we using any Hints when Optimizer is  CBO ?( i am using oracle 10g r2)
    bcoz some dba of my project are saying dont ever user Hints if optimizer is CBO. It will Handle the query and will give you most efficient execution plan.
    can you please guide me about this?  and my another question is that if I am writting a select statement and it involve the join of 7 tables(assume)
    then is it necessary to have the proper order of table and where clause if i am using CBO optimizer?
    Thanks in advance,
    Prashant

    1. Your DBA is right. Using Optimizer hints is the path of last resort.
    See: Ask Tom "Hints When to use"
    2. No need to worry about the order of tables, CBO is smart enough to figure that out.
    Suggest you read more about it here:
    https://blogs.oracle.com/optimizer/
    Hinting | Oracle Scratchpad

  • Re: Oracle 8i (8.1.7.4) Rule based v/s Cost based

    Hi,
    I would like to know the advantages/disadvantages of using RULE based optimizer v/s COST based optimizer in Oracle 8i. We have a production RULE based database and are experiencing performance issues on some queries sporadically.
    TKPROF revealed:
    call       count       cpu    elapsed             disk                  query                current              rows
    Parse        0      0.00       0.00                0                      0                      0                      0
    Execute      3     94.67    2699.16            1020421            5692711            51404               0
    Fetch       13    140.93    4204.41             688482             4073366            0                      26896
    total       16       235.60    6903.57           1708903            9766077            51404               26896
    Please post your expert suggestions as soon as possible.
    Thanks and Regards,
    A

    I think the answer you are looking for is that Rule Based optimizer is predictive, but Cost Based optimizer results may vary depending on statistics of rows, indexes, etc. But at the same time, you can typically get better speed for OLTP relational databases with CBO, assuming you have correct statistics, and correct optimizer settings set.

  • How to do query Optimization ,plz share any documents with real examples

    Hi All,
    could any one please provide me some informations, how can i do query optimization in oracle using Third party tool sql developer .
    i am working oracle 10g version,please share with me if any documents or ppt like that.
    Thanks
    Krupa

    879534 wrote:
    Hi All,
    could any one please provide me some informations, how can i do query optimization in oracle using Third party tool sql developer .SQL Developer is Oracle's development tool, not a third party tool.
    Questions about using SQL Developer should go in the SQL Developer forum:
    SQL Developer
    I'll move the question there for you.

  • Get Last Sync and Last Full/Fast Optimization time of a Text Index

    Hi,
    How to get when a text index was last Sync and Last Full/Fast Optimization in oracle 10g and 11g
    - Nimish Garg

    Hi,
    to my knowledge Oracle will not keep this kind of data (I can not find any view in CTXSYS schema which gives this information. Depending on the method of synching there are some options:
    - If you used 'SYNC (ON COMMIT"), then the index is always synched and there is no date to be found
    - If you used 'Every "interval"', there is a job created (select idx_sync_jobname from ctx_user_indexes). You can find the last runtime of this job to get the last sync date
    - If you used 'MANUAL', then the Sync is up to you. You can query CTX_USER_PENDING for the index. In this table the records are recorded which need to be synced. So the lowest PND_TIMESTAMP will give you an idea, of the possible last sync date, it is before this timestamp.
    If you do it manual, you can of course keep your own table which records the date.
    Herald ten Dam
    http://htendam.wordpress.com

  • R12.1.3 certification for JDK and other products on Oracle Linux 6

    Hello
    We are in the process of migrating R12.1.3 from Linux 5.4 (64bit) on physical server to OEL 6.5 (64bit) on Oracle VM.
    Currently running IAS 10.1.3.5 , Forms 10.1.2.3,  JDK 1.6_10 on HTTP Server Node and 1.4.2_14-b05 on Developer 10g (Forms/Reports). JRE client is 1.6_24.
    The future state is R12.1.3 on OEL 6.5 on Oracle VM with JRE 7.  
    The plan is to use Rapid Clone as we are already on 10.1.3.5 and DB 11.2.0.3.
    The uncertainty is with JDK as the certification on MOS for R12.1.3/OEL 6 indicates minimum version of JDK is 1.6_26.  
    Should I upgrade to JDK 1.6_26 as a minimum, on the apps tier 10.1.3_HOME and 10.1.2_HOME on Linux 5.4 before cloning to OEL 6.5?  Or can we continue running the current JDK apps tier versions on OEL 6.5 and only upgrade the client to JRE 7,  without updating JDK?
    Taking into account the current versions, can I use the pre-build R12.1.3 VM templates on the new hardware and then clone?
    Furthermore, I read the following comment on Steven Chan's blog,  it was in June 2012, are these products certified now?
    "there is still some unsupported products on OEL6*
      Oracle Advanced Supply Chain Planning (MSC)
      Oracle Inventory Optimization (MSR) 
      Oracle Constraint Based Optimization (MSO) 
      Oracle Work In Process (WIP) 
      Oracle Manufacturing Scheduling (WPS)"
    Any suggestions/assistance will be appreciated.
    Thanks in advance.
    Asha

    Pl do not post duplicates - R12.1.3 JDK certification for OEL 6.5

  • Context Index Optimization

    hi ,
    This is w.r.to the "maxtime" parameter used in the Context Index Optimization.
    As per optimization norms Oracle should optimize the index until the number of minutes specified in the "maxtime" parameter.
    For e:g
    ctx_ddl.optimize_index('item_ctxdesc', 'FULL', 30);
    Here Oracle should optimize the index for 30 minutes as specified above. But it runs for arround 4 hours and sometimes 5 hours.
    Could anyone please clarify or explain on this ?
    thanx and regards
    Naresh
    Oracle DBA

    This is certification forum. Post your query under:
    Database - General
    General Database Discussions

  • What are the use cases of Oracle SOA Coherence?

    Hi All,
    I would like to understand the actual use cases of Oracle SOA Coherence? Also, Coherence is bundled with SOA Suite or we need a separate License for it?
    Regards
    Manju B.S

    Hi,
    Just check below link..would be helpful..
    http://www.oracle.com/global/ap/openworld/ppt_download/database_manageability%2011g%20overview_230.pdf
    and
    Each release of Oracle has many differences, and Oracle 10g is a major re-write of the Oracle kernel from Oracle 9i. While there are several hundred new features and other differences between 9i and 10g, here are the major differences between Oracle9i and Oracle10g:
    Major changes to SQL optimizer internals
    Oracle Grid computing
    AWR and ASH tables incorporated into Oracle Performance Pack and Diagnostic Pack options
    Automated Session History (ASH) materializes the Oracle Wait Interface over time
    Data Pump replaces imp utility with impdp
    Automatic Database Diagnostic Monitor (ADDM)
    SQLTuning Advisor
    SQLAccess Advisor
    Rolling database upgrades (using Oracle10g RAC)
    dbms_scheduler package replaces dbms_job for scheduling
    and you need to refer oracle documentation for sql, plsql references where you will know particular enhancements made...
    thanks
    Prasanth
    Edited by: Onenessboy on Oct 23, 2010 10:22 AM

  • Performance analysis and optimization tools

    Hello I am looking for some tools for Performance analysis and optimization for Oracle. For now I looked over Spotlight, Ignite and Embarcadero DB Optimizer. Can you please point out some links or something for comparing such tools?
    What tools do you use?
    Thanks,

    For performance analysis you can use AWR and ASH.
    -- How to analyze AWR/statpack
    http://jonathanlewis.wordpress.com/statspack-examples/
    -- how to take AWR and ASH report
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/autostat.htm#PFGRF02601
    http://www.oracle.com/technology/pub/articles/10gdba/week6_10gdba.html
    Regards
    Asif Kabir

  • Please answer these questions.....Urgent

    Q You are using Data Guard to ensure high availability. The directory structures on the primary and the standby hosts are different.
    Referring to the scenario above, what initialization parameter do you set up during configuration of the standby database?
    db_convert_dir_name
    db_convert_file_name
    db_dir_name_convert
    db_directory_convert
    db_file_name_convert
    Oracle 9i Administration, Question 1 of 12
    Q What facility does Oracle provide to detect chained and migrated rows after the proper tables have been created?
    The RDBMS cannot detect this. It must use regular export and import with compress=y to remove chained and migrated rows as part of the regular database.
    The UTLCHAIN utility
    The DBMS_REPAIR package
    The ANALYZE command with the LIST CHAINED ROWS option
    The DBMS_MIG_CHAIN built-in package
    Q While doing an export, the following is encountered:
    ORA-1628 ... max # extents ... reached for rollback segment ..
    Referring to the scenario above, what do you do differently so that the export is resumed even after getting the space allocation error?
    Use the RESUMABLE=Y option for the export.
    Run the export with the AUTO_ROLLBACK_EXTEND=Y option.
    Increase the rollback segment extents before running the export.
    Use THE RESUME=Y option for the export.
    Monitor the rollback segment usage while the export is running and increase it if it appears to be running out of space.
    Q
    The DBCA (Database Configuration Assistant) prompts the installer to enter the password for which default users?
    SYS and SYSTEM
    OSDBA and INTERNAL
    SYSOPER and INTERNAL
    SYS and INTERNAL
    SYSTEM and SYSDBA
    Q You are designing the physical database for an application that stores dates and times. This will be accessed by users from all over the world in different time zones. Each user needs to see the time in his or her time zone.
    Referring to the scenario above, what Oracle data type do you use to facilitate this requirement?
    DATE
    TIMESTAMP WITH TIME ZONE
    TIMESTAMP
    DATETIME
    TIMESTAMP WITH LOCAL TIME ZONE
    Q Which one of the following conditions prevents you from redefining a table online?
    The table has a composite primary key.
    The table is partitioned by range.
    The table's organization is index-organized.
    The table has materialized views defined on it.
    The table contains columns of data type LOB.
    Q An Oracle database administrator is upgrading from Oracle 8.1.7 to Oracle 9i.
    Referring to the scenario above, which one of the following scripts does the Oracle database administrator run after verifying all steps in the upgrade checklist?
    u8.1.7.sql
    u81700.sql
    u0900020.sql
    u0801070.sql
    u0817000.sql
    Q What command do you use to drop a temporary tablespace and the associated OS files?
    ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP;
    ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP;
    ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP INCLUDING DATAFILES;
    ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP CASCADE;
    ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP INCLUDING CONTEN
    Q You wish to use a graphical interface to manage database locks and to identify blocking locks.
    Referring to the scenario above, what DBA product does Oracle offer that provides this functionality?
    Oracle Expert, a tool in the Oracle Enterprise Manager product
    Lock Manager, a tool in the base Oracle Enterprise Manager (OEM) product, as well as the console
    Lock Manager, a tool in Oracle Enterprise Manager's Tuning Pack
    The console of Oracle Enterprise Manager
    Viewing the Lock Manager charts of the Oracle Performance Manager, a tool in the Diagnostics Pack add on
    Q CREATE DATABASE abc
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXDATAFILES 20
    MAXLOGHISTORY 100
    Referring to the code segment above, how do you change the MAX parameters shown?
    They can be changed using an ALTER SYSTEM command, but the database must be in the NOMOUNT state.
    The MAX parameters cannot be changed without exporting the entire database, re-creating it, and importing.
    They can be changed using an ALTER SYSTEM command while the database is open.
    They can be changed in the init.ora file, but the database must be restarted for the values to take effect.
    They cannot be changed unless you re-create your control file
    Q You need to change the archivelog mode of an Oracle database.
    Referring to the scenario above, what steps do you take before actually changing the archivelog mode?
    Execute the archive log list command
    Start up the instance and mount the database but do not open it.
    Start up the instance and mount and open the database in restricted mode.
    Kill all user sessions to ensure that there is no database activity that might trigger redolog activity.
    Take all tablespaces offline
    Q You are experiencing performance problems due to network traffic. One way to tune this is by setting the SDU size.
    Referring to the scenario above, why do you change the SDU size?
    A high-speed network is available where the data transmission effect is negligible.
    The application can be tuned to account for the delays.
    The requests to the database return small amounts of data as in an OLTP system.
    The data coming back from the server are fragmented into several packets.
    A large number of users are logged on concurrently to the system.
    Q When interpreting statistics from the v$sysstat, what factor do you need to keep in mind that can skew your statistics?
    Choice 1 The statistics are static and must be updated by running the analyze command to include the most recent activity.
    Choice 2 The statistics are only valid as a point in time snapshot of activity.
    Choice 3 The statistics gathered by v$sysstat include database startup activities and database activity that initially populates the database buffer cache and shared pool.
    Choice 4 The statistics do not include administrative users.
    Choice 5 The statistics gathered are based on individual sessions, so you must interpret them based on the activity and application in which the user was involved at the time you pull the statistics.
    Q When interpreting statistics from the v$sysstat, what factor do you need to keep in mind that can skew your statistics?
    Choice 1 The statistics are static and must be updated by running the analyze command to include the most recent activity.
    Choice 2 The statistics are only valid as a point in time snapshot of activity.
    Choice 3 The statistics gathered by v$sysstat include database startup activities and database activity that initially populates the database buffer cache and shared pool.
    Choice 4 The statistics do not include administrative users.
    Choice 5 The statistics gathered are based on individual sessions, so you must interpret them based on the activity and application in which the user was involved at the time you pull the statistics.
    Q You want to shut down the database, but you do not want client connections to lose any non-committed work. You also do not want to wait for every open session to disconnect.
    Referring to the scenario above, what method do you use to shut down the database?
    Choice 1 Shutdown abort
    Choice 2 Shutdown immediate
    Choice 3 Shutdown transactional
    Choice 4 Shutdown restricted sessions
    Choice 5 Shutdown normal
    Q What step or steps do you take to enable Automatic Undo Management (AUM)?
    Choice 1 Create the UNDO tablespace, then ALTER SYSTEM SET AUTO_UNDO.
    Choice 2 Use ALTER SYSTEM SET AUTO_UNDO; parameter.
    Choice 3 Add UNDO_MANAGEMENT=AUTO parameter to init.ora, stop/start the database.
    Choice 4 Add UNDO_AUTO to parameter to init.ora, stop/start the database, and create the UNDO tablespace.
    Choice 5 Add UNDO_MANAGEMENT=AUTO parameter to init.ora, create the UNDO tablespace, stop/start the database
    AUTOMATIC UNDO PARAMETER SETTINGS.
    Q What Oracle 9i feature allows the database administrator to create tablespaces, datafiles, and log groups WITHOUT specifying physical filenames?
    Choice 1 Dynamic SGA
    Choice 2 Advanced Replication
    Choice 3 Data Guard
    Choice 4 Oracle Managed Files
    Choice 5 External Tables
    Q What Oracle 9i feature allows the database administrator to create tablespaces, datafiles, and log groups WITHOUT specifying physical filenames?
    Choice 1 Dynamic SGA
    Choice 2 Advanced Replication
    Choice 3 Data Guard
    Choice 4 Oracle Managed Files
    Choice 5 External Tables
    Q What package is used to specify audit requirements for a given table?
    Choice 1 DBMS_TRACE
    Choice 2 DBMS_FGA
    Choice 3 DBMS_AUDIT
    Choice 4 DBMS_POLICY
    Choice 5 DBMS_OBJECT_AUDIT
    Q What facility does Oracle provide to detect chained and migrated rows after the proper tables have been created?
    Choice 1 The ANALYZE command with the LIST CHAINED ROWS option
    Choice 2 The RDBMS cannot detect this. It must use regular export and import with compress=y to remove chained and migrated rows as part of the regular database.
    Choice 3 The DBMS_MIG_CHAIN built-in package
    Choice 4 The DBMS_REPAIR package
    Choice 5 The UTLCHAIN utility
    Q What are the three functions of an undo segment?
    Choice 1 Rolling back archived redo logs, database recovery, recording user trace information
    Choice 2 The rollback segment has only one purpose, and that is to roll back transactions that are aborted.
    Choice 3 Rolling back uncommitted transactions, maintaining read consistency, logging processed SQL statements
    Choice 4 Rolling back transactions, maintaining read consistency, database recovery
    Choice 5 Rolling back transactions, recording Data Manipulation Language (DML) statements processed against the database, recording Data Definition Language (DDL) statements processed against the database
    Q Which one of the following describes locally managed tablespaces?
    Choice 1 Tablespaces within a Recovery Manager (RMAN) repository
    Choice 2 Tablespaces that are located on the primary server in a distributed database
    Choice 3 Tablespaces that use bitmaps within their datafiles, rather than data dictionaries, to manage their extents
    Choice 4 Tablespaces that are managed via object tables stored in the system tablespace
    Choice 5 External tablespaces that are managed locally within an administrative repository serving an Oracle distributed database or Oracle Parallel Server
    Q The schema in a database you are administering has a very complex and non-user friendly table and column naming system. You need a simplified schema interface to query and on which to report.
    Which one of the following mechanisms do you use to meet the requirement stated in the above scenario?
    Choice 1 Synonym
    Choice 2 Stored procedure
    Choice 3 Labels
    Choice 4 Trigger
    Choice 5
    View
    Q You need to change the archivelog mode of an Oracle database.
    Referring to the scenario above, what steps do you take before actually changing the archivelog mode?
    Choice 1 Start up the instance and mount the database but do not open it.
    Choice 2 Execute the archive log list command
    Choice 3 Kill all user sessions to ensure that there is no database activity that might trigger redolog activity.
    Choice 4 Take all tablespaces offline.
    Choice 5 Start up the instance and mount and open the database in restricted mode.
    Q The Oracle Internet Directory debug log needs to be changed to show the following events information.
    Given the Debug Event Types and their numeric values:
    Starting and stopping of different threads. Process related. - 4
    Detail level. Shows the spawned commands and the command-line arguments passed - 32
    Operations being performed by configuration reader thread. Configuration refresh events. - 64
    Actual configuration reading operations - 128
    Operations being performed by scheduler thread in response to configuration refresh events, and so on - 256
    What statement turns debug on for all of the above event types?
    Choice 1 oidctl server=odisrv debug=4 debug=32 debug=64 debug=128 debug=256 start
    Choice 2 oidctl server=odisrv debug="4,32,64,128,256" start
    Choice 3 oidctl server=odisrv flags="debug=4 debug=32 debug=64 debug=128 debug=256" start
    Choice 4 oidctl server=odisrv flags="debug=484" start
    Choice 5 oidctl server=odisrv flags="debug=4,32,64,128,256" start
    Q Which Data Guard mode has the lowest performance impact on the primary database?
    Choice 1 Instant protection mode
    Choice 2 Guaranteed protection mode
    Choice 3 Rapid protection mode
    Choice 4 Logfile protection mode
    Choice 5 Delayed protection mode
    Q In a DSS environment, the SALES data is kept for a rolling window of the past two years.
    Referring to the scenario above, what type of partitioning do you use for this data?
    Choice 1 Hash Partitioning
    Choice 2 Range Partitioning
    Choice 3 Equipartitioning
    Choice 4 List Partitioning
    Choice 5 Composite Partitioning
    Q What are the three main areas of the SGA?
    Choice 1 Log buffer, shared pool, database writer
    Choice 2 Database buffer cache, shared pool, log buffer
    Choice 3 Shared pool, SQL area, redo log buffer
    Choice 4 Log writer, archive log, database buffer
    Choice 5
    Database buffer cache, log writer, shared pool
    Q When performing full table scans, what happens to the blocks that are read into buffers?
    Choice 1 They are put on the MRU end of the buffer list by default.
    Choice 2 They are put on the MRU end of the buffer list if the NOCACHE clause was used while altering or creating the table.
    Choice 3 They are read into the first free entry in the buffer list.
    Choice 4 They are put on the LRU end of the buffer list if the CACHE clause was used while altering or creating the table.
    Choice 5 They are put on the LRU end of the buffer list by default
    Q Standard security policy is to force users to change their passwords the first time they log in to the Oracle database.
    Referring to the scenario above, how do you enforce this policy?
    Choice 1 Use the FORCE PASSWORD EXPIRE clause when the users are first created in the database.
    Choice 2 Ask the users to follow the standards and trust them to do so.
    Choice 3 Periodically compare the users' passwords with their initial password and generate a report of the users violating the standard.
    Choice 4 Use the PASSWORD EXPIRE clause when the users are first created in the database.
    Choice 5 Check the users' passwords after they first log in to see if they have changed it. If not, remind them to do so.
    Q What object privilege is necessary for a foreign key constraint to be created and enforced on the referenced table?
    Choice 1 References
    Choice 2 Alter
    Choice 3 Update
    Choice 4 Resource
    Choice 5 Select
    Q What command do you use to drop a temporary tablespace and the associated OS files?
    Choice 1 ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP INCLUDING CONTENTS
    Choice 2 ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP INCLUDING DATAFILES;
    Choice 3 ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP;
    Choice 4 ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP;
    Choice 5 ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP CASCADE;
    Q You need to implement a failover strategy using TAF. You do not have enough resources to ensure that your backup Oracle instance will be up and running in parallel with the primary.
    Referring to the scenario above, what failover mode do you use?
    Choice 1 FAILOVER_MODE=manual
    Choice 2 FAILOVER_MODE=none
    Choice 3 FAILOVER_MODE=auto
    Choice 4 FAILOVER_MODE=basic
    Choice 5 FAILOVER_MODE=preconnect
    Q An Oracle database used for an OLTP application is encountering the "snapshot too old" error.
    Referring to the scenario above, which database object or objects do you query in order to set the OPTIMAL parameter for the rollback segments?
    Choice 1 V$ROLLNAME and V$ROLLSTAT
    Choice 2 V$ROLLNAME
    Choice 3 V$ROLLSTAT
    Choice 4 DBA_ROLL and DBA_ROLLSTAT
    Choice 5 DBA_ROLLBACK_SEG
    QWhat are five background processes that must always be running in a functioning Oracle Instance?
    Choice 1 SMON (system monitor), PMON (process monitor), RECO (recoverer process), ARCH (archive process), CKPT (checkpoint process)
    Choice 2 DBW0 (database writer), SMON (system monitor), PMON (process monitor), LGWR (log writer), CKPT (checkpoint process)
    Choice 3 DBW0 (database writer), SMON (system monitor), PMON (process monitor), D000 (Dispatcher process), CKPT (checkpoint process)
    Choice 4 DBW0 (database writer), CKPT (checkpoint process), RECO (recoverer process), LGWR (log writer), ARCH (archive process)
    Choice 5 DBW0 (database writer), LGWR (log writer), ARCH (archive process), CKPT (checkpoint process), RECO (recoverer process)
    You have two large tables with thousands of rows. To select rows from the table_1, which are not referenced by an indexed common column (e.g. col_1) in table_2, you issue the following statement:
    select * from table_1
    where col_1 NOT in (select col_1 from table_2);
    This statement is taking a very long time to return its result set.
    Referring to the scenario above, which equivalent statement returns much faster?
    Choice 1
    select * from table_1
    where not exists (select * from table_2)
    Choice 2
    select * from table_2
    where col_1 not in (select col_1 from table_1)
    Choice 3
    select * from table_1
    where col_1 in (select col_1 from table_2 where col_1 = table_1.col_1)
    Choice 4
    select * from table_1
    where not exists (select 'x' from table_2 where col_1 = table_1.col_1)
    Choice 5
    select table_1.* from table_1, table_2
    where table_1.col_1 = table_2.col_1 (+)
    Performance is poor during peak transaction periods on a database you administer. You would like to view some statistics on areas such as LGWR (log writer) waits.
    Referring to the scenario above, what performance view do you query to access these statistics?
    Choice 1
    DBA_CATALOG
    Choice 2
    V$SESS_IO
    Choice 3
    V$SYSSTAT
    Choice 4
    V$PQ_SYSSTAT
    Choice 5
    V$SQLAREA
    You need to assess the performance of your shared pool at instance startup, but you cannot restart the database.
    Referring to the scenario above, how do you empty your SGA?
    Choice 1
    Execute $ORACLE_HOME/bin/db_shpool_flush
    Choice 2
    ALTER SYSTEM FLUSH SHARED_POOL
    Choice 3
    ALTER SYSTEM CLEAR SHARED POOL
    Choice 4
    DELETE FROM SYS.V$SQLAREA
    Choice 5
    DELETE FROM SYS.V$SQLTEXT
    You are reading the explain plan of a problem query and notice that full table scans are used with a HASH join.
    Referring to the scenario above, in what instance is a HASH join beneficial?
    Choice 1
    When joining two small tables--neither having any primary keys or unique indexes
    Choice 2
    When no indexes are present
    Choice 3
    When using the parallel query option
    Choice 4
    When joining two tables where one table may be significantly larger than the other
    Choice 5
    Only when using the rule-based optimizer
    An Oracle database administrator is upgrading from Oracle 8.1.7 to Oracle 9i.
    Referring to the scenario above, which one of the following scripts does the Oracle database administrator run after verifying all steps in the upgrade checklist?
    Choice 1
    u0817000.sql
    Choice 2
    u0900020.sql
    Choice 3
    u8.1.7.sql
    Choice 4
    u81700.sql
    Choice 5
    u0801070.sql
    You have a large On-Line Transaction Processing (OLTP) database running in archive log mode with two redo log groups that have two members each.
    Referring to the above scenario, to avoid stalling during peak activity periods, which one of the following actions do you take?
    Choice 1
    Add a third member to each of the groups.
    Choice 2
    Increase your LOG_CHECKPOINT_INTERVAL setting.
    Choice 3
    Turn off archive logging.
    Choice 4
    Add a third redo log group.
    Choice 5
    Turn off redo log multiplexing
    What object does a database administrator create to store precompiled summary data?
    Choice 1
    Replicated Table
    Choice 2
    Archive Log
    Choice 3
    Temporary Tablespace
    Choice 4
    Cached Table
    Choice 5
    Materialized View
    Which one of the following statements do you execute in order to find the current default temporary tablespace?
    Choice 1
    SELECT property_name, property_value FROM v$database_properties
    Choice 2
    show parameter curr_default_temp_tablespace
    Choice 3
    SELECT property_name, property_value FROM all_database_properties
    Choice 4
    SELECT property_name, property_value FROM database_properties
    Choice 5
    SELECT property_name, property_value FROM dba_database_properties
    In which one of the following situations do you use a bitmap index?
    Choice 1
    With column values that are guaranteed to be unique
    Choice 2
    With column values having a high cardinality
    Choice 3
    With column values having a consistently uniform distribution
    Choice 4
    With column values having a low cardinality
    Choice 5
    With column values having a non-uniform distribution
    A table has more than two million rows and, if exported, will exceed 4 GB in size with data, indexes, and constraints. The UNIX you are using has a 2 GB limit on file sizes. This table needs to be backed up using Oracle EXPORT.
    There are two ways this table can be exported and split into multiple files. One way is to use the UNIX pipe, split, and compress commands in conjunction with the Oracle EXPORT utility to generate multiple equally-sized files.
    Referring to the scenario above, what is the other way that you can export and split into multiple files?
    Choice 1
    Export the data into one file and the index into another file.
    Choice 2
    Use a WHERE clause with the export to limit the number of rows returned.
    Choice 3
    Vertically partition the table into sizes of less than 2 GB and then export each partition as a separate file.
    Choice 4
    Specify the multiple files in the FILE parameter and specify the FILESIZE in the EXPORT parameter file.
    Choice 5
    Horizontally partition the table into sizes of less than 2 GB and then export each partition as a separate file.
    Which one of the following statements describes the PASSWORD_GRACE_TIME profile setting?
    Choice 1
    It specifies the grace period, in days, for changing the password once expired.
    Choice 2
    It specifies the grace period, in days, for changing the password from the time it is initially set and the time the account is made active.
    Choice 3
    It specifies the grace period, in minutes, for changing the password once expired.
    Choice 4
    It specifies the grace period, in days, for changing the password after the first successful login after the password has expired.
    Choice 5
    It specifies the grace period, in hours, for changing the password once expired.
    In OEM, what color and icon are associated with a warning?
    Choice 1
    Yellow hexagon
    Choice 2
    Yellow flag
    Choice 3
    Red flag
    Choice 4
    Gray flag
    Choice 5
    Red hexagon
    What parameter in the SQLNET.ORA file specifies the order of the naming methods to be used?
    Choice 1
    NAMES.SEARCH_ORDER
    Choice 2
    NAMES.DOMAIN_HINTS
    Choice 3
    NAMES.DIRECTORY_PATH
    Choice 4
    NAMES.DOMAINS
    Choice 5
    NAMES.DIRECTORY
    An Oracle 9i database instance has automatic undo management enabled. This allows you to use the Flashback Query feature of Oracle 9i.
    Referring to the scenario above, what UNDO parameter needs to be set so that this feature allows consistent queries of data up to 90 days old?
    Choice 1
    UNDO_TABLESPACE
    Choice 2
    UNDO_TIMELIMIT
    Choice 3
    UNDO_MANAGEMENT
    Choice 4
    UNDO_FLASHBACKTO
    Choice 5
    UNDO_RETENTION
    An Oracle 9i database instance has automatic undo management enabled. This allows you to use the Flashback Query feature of Oracle 9i.
    Referring to the scenario above, what UNDO parameter needs to be set so that this feature allows consistent queries of data up to 90 days old?
    Choice 1
    UNDO_TABLESPACE
    Choice 2
    UNDO_TIMELIMIT
    Choice 3
    UNDO_MANAGEMENT
    Choice 4
    UNDO_FLASHBACKTO
    Choice 5
    UNDO_RETENTION
    DB_BLOCK_SIZE=8192
    DB_CACHE_SIZE=128M
    DB_2K_CACHE_SIZE=64M
    DB_4K_CACHE_SIZE=32M
    DB_8K_CACHE_SIZE=16M
    DB_16K_CACHE_SIZE=8M
    Referring to the initialization parameter settings above, what is the size of the cache of standard block size buffers?
    Choice 1
    8 M
    Choice 2
    16 M
    Choice 3
    32 M
    Choice 4
    64 M
    Choice 5
    128 M
    DB_CREATE_FILE_DEST='/u01/oradata/app01'
    DB_CREATE_ONLINE_LOG_DEST_1='/u02/oradata/app01'
    Referring to the sample code above, which one of the following statements is NOT correct?
    Choice 1
    Data files created with no location specified are created in the DB_CREATE_FILE_DEST directory.
    Choice 2
    Control files created with no location specified are created in the DB_CREATE_ONLINE_LOG_DEST_1 directory.
    Choice 3
    Redolog files created with no location specified are created in the DB_CREATE_ONLINE_LOG_DEST_1 directory.
    Choice 4
    Control files created with no location specified are created in the DB_CREATE_FILE_DEST directory.
    Choice 5
    Temp files created with no location specified are created in the DB_CREATE_FILE_DEST directory.
    LogMiner GUI is a part of which one of the following?
    Choice 1
    Oracle Enterprise Manager
    Choice 2
    Oracle LogMiner Plug-In
    Choice 3
    Oracle Diagnostics Pack
    Choice 4
    Oracle Performance Tuning Pack
    Choice 5
    Oracle LogMiner StandAlone GUI
    The schema in a database you are administering has a very complex and non-user friendly table and column naming system. You need a simplified schema interface to query and on which to report.
    Which one of the following mechanisms do you use to meet the requirement stated in the above scenario?
    Choice 1
    View
    Choice 2
    Trigger
    Choice 3
    Stored procedure
    Choice 4
    Synonym
    Choice 5
    Labels
    alter index gl.GL_JE_LINES_N1 rebuild
    You determine that an index has too many extents and want to rebuild it to avoid fragmentation performance degradation.
    When you issue the above scenario, where is the rebuilt index stored?
    Choice 1
    In the default tablespace for the login name you are using
    Choice 2
    You cannot rebuild an index. You must drop the existing index and re-create it using the create index statement.
    Choice 3
    In the system tablespace
    Choice 4
    In the same tablespace as it is currently stored
    Choice 5
    In the index tablespace respective to the data table on which the index is built
    Which one of the following describes locally managed tablespaces?
    Choice 1
    Tablespaces within a Recovery Manager (RMAN) repository
    Choice 2
    External tablespaces that are managed locally within an administrative repository serving an Oracle distributed database or Oracle Parallel Server
    Choice 3
    Tablespaces that are located on the primary server in a distributed database
    Choice 4
    Tablespaces that use bitmaps within their datafiles, rather than data dictionaries, to manage their extents
    Choice 5
    Tablespaces that are managed via object tables stored in the system tablespace
    Which method of database backup supports true incremental backups?
    Choice 1
    Export
    Choice 2
    Operating System backups
    Choice 3
    Oracle Enterprise Backup Utility
    Choice 4
    Incremental backups are not supported. You must use full or cumulative backups.
    Choice 5
    Recovery Manager
    You are using Data Guard to ensure high availability. The directory structures on the primary and the standby hosts are different.
    Referring to the scenario above, what initialization parameter do you set up during configuration of the standby database?
    Choice 1
    db_dir_name_convert
    Choice 2
    db_convert_dir_name
    Choice 3
    db_convert_file_name
    Choice 4
    db_directory_convert
    Choice 5
    db_file_name_convert
    Tablespace APP_INDX is put in online backup mode when redo log 744 is current. When APP_INDX is taken out of online backup mode, redo log 757 is current.
    Referring to the scenario above, if the backup is restored, what are the start and end redo logs used, in order, to perform a successful point-in-time recovery of APP_INDX?
    Choice 1
    Start Redo Log 744, End Redo Log 757
    Choice 2
    Start Redo Log 743, End Redo Log 756
    Choice 3
    Start Redo Log 745, End Redo Log 756
    Choice 4
    Start Redo Log 744, End Redo Log 756
    Choice 5
    Start Redo Log 743, End Redo Log 757
    You want to make new data entered or changed in a table adhere to a given integrity constraint, but data exist in the table that violates the constraint.
    Referring to the scenario above, what do you do?
    Choice 1
    Use an enabled novalidate constraint.
    Choice 2
    Use an enabled validate constraint.
    Choice 3
    Use a deferred constraint.
    Choice 4
    Use a disabled constraint.
    Choice 5
    You cannot enforce this type of constraint
    In Oracle 9i, the connect internal command has been discontinued.
    Referring to the text above, how do you achieve a privileged connection in Oracle 9i?
    Choice 1
    CONNECT <username> AS SYSOPER where username has DBA privileges.
    Choice 2
    CONNECT <username> as SYSDBA.
    Choice 3
    Connect using Enterprise Manager.
    Choice 4
    CONNECT sys.
    Choice 5
    Use CONNECT <username> as normal but include the user in the external password file.
    How many partitions can a table have?
    Choice 1
    64
    Choice 2
    255
    Choice 3
    1,024
    Choice 4
    65,535
    Choice 5
    Unlimited
    In Cache Fusion, when does a request by one process for a resource owned by another process fail?
    Choice 1
    When a null mode resource request is made for a resource already owned in exclusive mode by another process
    Choice 2
    When a shared mode resource request is made for a resource already owned in shared mode by another process
    Choice 3
    When a shared mode resource request is made for a resource already owned in null mode by another process
    Choice 4
    When an exclusive mode resource request is made for a resource already owned in null mode by another process
    Choice 5
    When an exclusive mode resource request is made for a resource already owned in shared mode by another process
    The Oracle Internet Directory debug log needs to be changed to show the following events information.
    Given the Debug Event Types and their numeric values:
    Starting and stopping of different threads. Process related. - 4
    Detail level. Shows the spawned commands and the command-line arguments passed - 32
    Operations being performed by configuration reader thread. Configuration refresh events. - 64
    Actual configuration reading operations - 128
    Operations being performed by scheduler thread in response to configuration refresh events, and so on - 256
    What statement turns debug on for all of the above event types?
    Choice 1
    oidctl server=odisrv flags="debug=4 debug=32 debug=64 debug=128 debug=256" start
    Choice 2
    oidctl server=odisrv debug="4,32,64,128,256" start
    Choice 3
    oidctl server=odisrv flags="debug=4,32,64,128,256" start
    Choice 4
    oidctl server=odisrv flags="debug=484" start
    Choice 5
    oidctl server=odisrv debug=4 debug=32 debug=64 debug=128 debug=256 start
    A new OFA-compliant database is being installed using the Oracle installer. The mount point being used is /u02.
    Referring to the scenario above, what is the default value for ORACLE_BASE?
    Choice 1
    /usr/app/oracle
    Choice 2
    /u02/oracle
    Choice 3
    /u02/app/oracle
    Choice 4
    /u01/app/oracle
    Choice 5
    /u02/oracle_base
    You need to start the Connection Manager Gateway and the Connections Admin processes.
    Referring to the scenario above, what command do you execute?
    Choice 1
    CMCTL START CM
    Choice 2
    CMCTL START CMADMIN
    Choice 3
    CMCTL START CMAN
    Choice 4
    CMCTL START CMGW
    Choice 5
    CMCTL START CMGW CMADM
    When performing full table scans, what happens to the blocks that are read into buffers?
    Choice 1
    They are read into the first free entry in the buffer list.
    Choice 2
    They are put on the MRU end of the buffer list if the NOCACHE clause was used while altering or creating the table.
    Choice 3
    They are put on the LRU end of the buffer list if the CACHE clause was used while altering or creating the table.
    Choice 4
    They are put on the LRU end of the buffer list by default.
    Choice 5
    They are put on the MRU end of the buffer list by default.
    You wish to take advantage of the Oracle datatypes, but you need to convert your existing LONG or LONG RAW columns to Character Large Object (CLOB) and Binary Large Object (BLOB) datatypes.
    Referring to the scenario above, what is the quickest method to use to perform this conversion?
    Choice 1
    Use the to_lob function when selecting data from the existing table into a new table.
    Choice 2
    Use the ALTER TABLE statement and MODIFY the column to the new LOB datatype.
    Choice 3
    You must export the existing data to external files and then re-import them as BFILE external LOBS.
    Choice 4
    Create a new table with the same columns but with the LONG or LONG RAW column changed to a CLOB or BLOB type. The next step is to INSERT INTO newtable select * from oldtable.
    Choice 5
    LONG and LONG RAW datatypes are not compatible with LOBS and cannot be converted within the Oracle database.
    You need to redefine the JOURNAL table in the stress test environment. You want to check first to see if it is possible to redefine this table online.
    Referring to the scenario above, what statement do you execute that checks whether or not the JOURNAL table can be redefined online if you are connected as the table owner?
    Choice 1
    Execute DBMS_REDEFINITION.CHECK_TABLE_REDEF(USER,'JOURNAL');
    Choice 2
    Execute DBMS_REDEFINITION.VERIFY_REDEF_TABLE(USER,'JOURNAL');
    Choice 3
    Execute DBMS_REDEFINITION.CAN_REDEF_TABLE(USER,'JOURNAL');
    Choice 4
    Execute DBMS_REDEFINITION.START_REDEF_TABLE(USER,'JOURNAL');
    Choice 5
    Execute DBMS_REDEFINITION.SYNC_INTERIM_TABLE(USER,'JOURNAL');
    An Oracle 9i database instance has automatic undo management enabled. This allows you to use the Flashback Query feature of Oracle 9i.
    Referring to the scenario above, what UNDO parameter needs to be set so that this feature allows consistent queries of data up to 90 days old?
    Choice 1
    UNDO_TIMELIMIT
    Choice 2
    UNDO_MANAGEMENT
    Choice 3
    UNDO_RETENTION
    Choice 4
    UNDO_TABLESPACE
    Choice 5
    UNDO_FLASHBACKTO
    Which one of the following procedures is used for the extraction of the LogMiner dictionary?
    Choice 1
    DBMS_LOGMNR_D.EXTRACT
    Choice 2
    DBMS_LOGMNR.BUILD
    Choice 3
    DBMS_LOGMINER_D.BUILD
    Choice 4
    DBMS_LOGMNR_D.BUILD_DICT
    Choice 5
    DBMS_LOGMNR_D.BUILD
    set pause on;
    column sql_text format a35;
    select sid, osuser, username, sql_text
    from v$session a, v$sqlarea b
    where a.sql_address=b.address
    and a.sql_hash_value=b.hash_value
    Why is the SQL*Plus sample code segment above used?
    Choice 1
    To view full text search queries by issuing user
    Choice 2
    To list all operating system users connected to the database
    Choice 3
    To view SQL statements issued by connected users
    Choice 4
    To detect deadlocks
    Choice 5
    To view paused database sessions
    When dealing with very large tables in which the size greatly exceeds the size of the System Global Area (SGA) data block buffer cache, which one of the following operations must be avoided?
    Choice 1
    Group operations
    Choice 2
    Aggregates
    Choice 3
    Index range scans
    Choice 4
    Multi-table joins
    Choice 5
    Full table scans
    You are reading the explain plan of a problem query and notice that full table scans are used with a HASH join.
    Referring to the scenario above, in what instance is a HASH join beneficial?
    Choice 1
    Only when using the rule-based optimizer
    Choice 2
    When joining two small tables--neither having any primary keys or unique indexes
    Choice 3
    When no indexes are present
    Choice 4
    When joining two tables where one table may be significantly larger than the other
    Choice 5
    When using the parallel query option
    Performance is poor during peak transaction periods on a database you administer. You would like to view some statistics on areas such as LGWR (log writer) waits.
    Referring to the scenario above, what performance view do you query to access these statistics?
    Choice 1
    V$SQLAREA
    Choice 2
    V$SYSSTAT
    Choice 3
    V$SESS_IO
    Choice 4
    V$PQ_SYSSTAT
    Choice 5
    DBA_CATALOG
    What security feature allows the database administrator to monitor successful and unsuccessful attempts to access data?
    Choice 1
    Autotrace
    Choice 2
    Fine-Grained Auditing
    Choice 3
    Password auditing
    Choice 4
    sql_trace
    Choice 5
    tkprof
    You need to configure a default domain that is automatically appended to any unqualified net service name.
    What Oracle-provided network configuration tool do you use to accomplish the above task?
    Choice 1
    Oracle Names Control Utility
    Choice 2
    Configuration File Utility
    Choice 3
    Oracle Network Configuration Assistant
    Choice 4
    Listener Control Utility
    Choice 5
    Oracle Net Manager
    You are experiencing performance problems due to network traffic. One way to tune this is by setting the SDU size.
    Referring to the scenario above, why do you change the SDU size?
    Choice 1
    The requests to the database return small amounts of data as in an OLTP system.
    Choice 2
    The application can be tuned to account for the delays.
    Choice 3
    The data coming back from the server are fragmented into several packets.
    Choice 4
    A large number of users are logged on concurrently to the system.
    Choice 5
    A high-speed network is available where the data transmission effect is negligible.
    You have partitioned the table ORDER on the ORDERID column using range partitioning. You want to create a locally partitioned index on this table. You also want this index to be unique.
    Referring to the scenario above, what is required for the creation of this unique locally partitioned index?
    Choice 1
    A unique partitioned index on a table cannot be local.
    Choice 2
    There can be only one unique locally partitioned index on the table.
    Choice 3
    The index has to be equipartitioned.
    Choice 4
    The table's primary key columns should be included in the index key.
    Choice 5
    The ORDERID column has to be part of the index's key.
    You have a large On-Line Transaction Processing (OLTP) database running in archive log mode with two redo log groups that have two members each.
    Referring to the above scenario, to avoid stalling during peak activity periods, which one of the following actions do you take?
    Choice 1
    Turn off redo log multiplexing.
    Choice 2
    Increase your LOG_CHECKPOINT_INTERVAL setting.
    Choice 3
    Add a third member to each of the groups.
    Choice 4
    Add a third redo log group.
    Choice 5 Turn off archive logging
    When transporting a tablespace, the tablespace needs to be self-contained.
    Referring to the scenario above, in which one of the following is the tablespace self-contained?
    Choice 1 A referential integrity constraint points to a table across a set boundary.
    Choice 2 A partitioned table is partially contained in the tablespace.
    Choice 3 An index inside the tablespace is for a table outside of the tablespace.
    Choice 4 A corresponding index for a table is outside of the tablespace.
    Choice 5 A table inside the tablespace contains a LOB column that points to LOBs outside the tablespace.
    You have experienced a database failure requiring a full database restore. Downtime is extremely costly, as is any form of data loss. You run the database in archive log mode and have a full database backup from three days ago. You have a database export from last night. You are not running Oracle Parallel Server (OPS).
    Referring to the above scenario, how do you minimize downtime and data loss?
    Choice 1 Import the data from the export using direct-path loading.
    Choice 2 Create a standby database and activate it.
    Choice 3 Perform a restore of necessary files and use parallel recovery operations to speed the application of redo entries.
    Choice 4 Conduct a full database restore and bring the database back online immediately. Apply redo logs during a future maintenance window.
    Choice 5 Perform a restore and issue a recover database command
    You have two large tables with thousands of rows. To select rows from the table_1, which are not referenced by an indexed common column (e.g. col_1) in table_2, you issue the following statement:
    select * from table_1
    where col_1 NOT in (select col_1 from table_2);
    This statement is taking a very long time to return its result set.
    Referring to the scenario above, which equivalent statement returns much faster?
    Choice 1 select * from table_1
    where col_1 in (select col_1 from table_2 where col_1 = table_1.col_1)
    Choice 2 select * from table_2
    where col_1 not in (select col_1 from table_1)
    Choice 3 select * from table_1
    where not exists (select 'x' from table_2 where col_1 = table_1.col_1)
    Choice 4 select table_1.* from table_1, table_2
    where table_1.col_1 = table_2.col_1 (+)
    Choice 5 select * from table_1
    Which one of the following initialization parameters is obsolete in Oracle 9i?
    Choice 1 LOG_ARCHIVE_DEST
    Choice 2 GC_FILES_TO_LOCKS
    Choice 3 FAST_START_MTTR_TARGET
    Choice 4 DB_BLOCK_BUFFERS
    Choice 5 DB_BLOCK_LRU_LATCHES
    You find that one of your tablespaces is running out of disk space.
    Referring to the scenario above, which one of the following is NOT a valid option to increase the space available to the tablespace?
    Choice 1 Move some segments to other tablespaces.
    Choice 2 Resize an existing datafile in the tablespace.
    Choice 3 Add another datafile to the tablespace.
    Choice 4 Increase the MAX_EXTENTS for the tablespace.
    Choice 5 Turn AUTOEXTEND on for one or more datafiles in the tablespace.
    What tools or utilities do you use to transfer the data dictionary's structural information of transportable tablespaces?
    Choice 1 DBMS_TTS
    Choice 2 SQL*Loader
    Choice 3 Operating System copy commands
    Choice 4 DBMS_STATS
    Choice 5 EXP and IMP
    Which one of the following, if backed up, is potentially problematic to a complete recovery?
    Choice 1
    Control file
    Choice 2
    System Tablespace
    Choice 3
    Data tablespaces
    Choice 4
    Online Redo logs
    Choice 5
    All archived redologs after the last backup
    Your database warehouse performs frequent full table scans. Your DB_BLOCK_SIZE is 16,384.
    Referring to the scenario above, what parameter do you use to reduce disk I/O?
    Choice 1 LOG_CHECKPOINT_TIMEOUT
    Choice 2 DBWR_IO_SLAVES
    Choice 3 DB_FILE_MULTIBLOCK_READ_COUNT
    Choice 4 DB_WRITER_PROCESSES
    Choice 5 DB_BLOCK_BUFFERS
    Which one of the following describes the "Reset database to incarnation" command used by Recovery Manager?
    Choice 1 It performs a resynchronization of online redo logs to a given archive log system change number (SCN).
    Choice 2 It performs point-in-time recovery when using Recovery Manager.
    Choice 3 It restores the database to the initial state in which it was found when first backing it up via Recovery Manager.
    Choice 4 It restores the database to a save point as defined by the version control number or incarnation number of the database.
    Choice 5 It is used to undo the effect of a resetlogs operation by restoring backups of a prior incarnation of the database.
    You are using the CREATE TABLE statement to populate the data dictionary with metadata to allow access to external data, where /data is a UNIX writable directory and filename.dbf is an arbitrary name.
    Referring to the scenario above, which clause must you add to your CREATE TABLE statement?
    Choice 1
    organization external
    Choice 2 external file /data/filename.dbf
    Choice 3 ON /data/filename.dbf
    Choice 4 organization file
    Choice 5 file /data/filename.dbf
    Your business user has expressed a need to be able to revert back to data that are at most eight hours old. You decide to use Oracle 9i's FlashBack feature for this purpose.
    Referring to the scenario above, what is the value of UNDO_RETENTION that supports this requirement?
    Choice 1 480
    Choice 2 8192
    Choice 3 28800
    Choice 4 43200
    Choice 5 28800000
    Materialized Views constitute which data warehousing feature offered by Oracle?
    Choice 1 FlashBack Query
    Choice 2 Summary Management
    Choice 3 Dimension tables
    Choice 4 ETL Enhancements
    Choice 5 Updateable Multi-table Views
    DB_BLOCK_SIZE=8192
    DB_CACHE_SIZE=128M
    DB_2K_CACHE_SIZE=64M
    DB_4K_CACHE_SIZE=32M
    DB_8K_CACHE_SIZE=16M
    DB_16K_CACHE_SIZE=8M
    Referring to the initialization parameter settings above, what is the size of the cache of standard block size buffers?
    Choice 1 8 M
    Choice 2 16 M
    Choice 3 32 M
    Choice 4 64 M
    Choice 5 128 M
    You need to send listener log information to the Oracle Support Services. The listener name is LSNRORA1.
    Referring to the scenario above, which one of the following statements do you use in the listener.ora file to generate this log information?
    Choice 1 TRACE_LEVEL_LSNRORA1=debug
    Choice 2 TRACE_LEVEL_LSNRORA1=admin
    Choice 3 TRACE_LEVEL_LSNRORA1=5
    Choice 4 TRACE_LEVEL_LSNRORA1=support
    Choice 5 TRACE_LEVEL_LSNRORA1=on
    Which one of the following statements causes you to choose the NOARCHIVELOG mode for an Oracle database?
    Choice 1
    The database does not need to be available at all times.
    Choice 2
    The database is used for a DSS application, and updates are applied to it once in 48 hours.
    Choice 3
    The database needs to be available at all times.
    Choice 4
    It is unacceptable to lose any data if a disk failure damages some of the files that constitute the database.
    Choice 5
    There will be times when you will need to recover to a point-in-time that is not current.
    You are experiencing performance problems due to network traffic. One way to tune this is by setting the SDU size.
    Referring to the scenario above, why do you change the SDU size?
    Choice 1 A large number of users are logged on concurrently to the system.
    Choice 2 A high-speed network is available where the data transmission effect is negligible.
    Choice 3 The data coming back from the server are fragmented into several packets.
    Choice 4 The application can be tuned to account for the delays.
    Choice 5 The requests to the database return small amounts of data as in an OLTP system.

    Post a few if you need answers to a few.
    Anyway, my best shot:-
    Q. Directories are different
    A. Use db_file_name_convert why? read about it.
    Q What facility does Oracle provide to detect chained and migrated rows after the proper tables have been created?
    A.The ANALYZE command with the LIST CHAINED ROWS option
    Q While doing an export, the following is encountered:
    my best guess
    Use the RESUMABLE=Y option for the export.
    Q. The DBCA (Database Configuration Assistant) prompts the installer to enter the password for which default users?
    A. SYS and SYSTEM
    Q You are designing the physical database for an application that stores dates and times. This will be accessed by users from all over the world in different time zones. Each user needs to see the time in his or her time zone.
    A. TIMESTAMP WITH LOCAL TIME ZONE
    Q What command do you use to drop a temporary tablespace and the associated OS files?
    A. ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP INCLUDING DATAFILES;
    Q You wish to use a graphical interface to manage database locks and to identify blocking locks.
    A. Lock Manager, a tool in the base Oracle Enterprise Manager (OEM) product, as well as the console
    Q CREATE DATABASE abc
    A. They cannot be changed unless you re-create your control file
    Q You need to change the archivelog mode of an Oracle database.
    A. Execute the archive log list command
    Q When interpreting statistics from the v$sysstat, what factor do you need to keep in mind that can skew your statistics?
    A.
    Choice 3 The statistics gathered by v$sysstat include database startup activities and database activity that initially populates the database buffer cache and shared pool.
    Q You want to shut down the database, but you do not want client connections to lose any non-committed work. You also do not want to wait for every open session to disconnect.
    Choice 3 Shutdown transactional
    Q What step or steps do you take to enable Automatic Undo Management (AUM)?
    A.Choice 5 Add UNDO_MANAGEMENT=AUTO parameter to init.ora, create the UNDO tablespace, stop/start the database
    Q What Oracle 9i feature allows the database administrator to create tablespaces, datafiles, and log groups WITHOUT specifying physical filenames?
    A. Choice 4 Oracle Managed Files

  • Context Index Peformance

    Hi,
    I want to create a context index on one column which contains large text. And the table contains millions of records and daily inserts happen into the same table. My question is
    1.Do we need to run any procedures after inserting the records daily i.e synchronization??
    2.Is there any problem from performace point of view creating context index on the table??
    Thanks,
    Sri

    hi,
    pls have a take a look this doc
    http://docs.oracle.com/cd/B19306_01/text.102/b14217/ind.htm
    http://stackoverflow.com/questions/1916244/how-to-sync-and-optimize-an-oracle-text-index
    regards,

  • How to get the count of each minutes

    Oracle 10 DB
    Hi All
    I using this query to get the count of records fetched by the concurrent program per min,
    select count (distinct b.attribute2)
    from oe_order_headers_all a,oe_order_lines_all b
    where a.header_id=b.header_id
    and b.flow_status_code ='AWAIT_QUINTIQ_BOOK'
    and to_Char(b.last_update_date,'DD-MON-YYYY HH24:MI:SS') between '19-JAN-2011 02:00:01' AND
    '19-JAN-2011 02:00:02'
    This is used to get the count of records fetched at one mins
    How to find the count of last 10 mins ie 1 mins count 2.00 to 2.10
    Thanks & Regards
    Srikkanth.M

    Try this:
    SELECT TRUNC(b.last_update_date, 'mi') time_mins, COUNT(DISTINCT b.attribute2)
    FROM   oe_order_headers_all a,
           oe_order_lines_all b
    WHERE  a.header_id = b.header_id
    AND    b.flow_status_code = 'AWAIT_QUINTIQ_BOOK'
    AND    b.last_update_date >= to_date('19/01/2011 02:00:00', 'dd/mm/yyyy hh24:mi:ss')
    AND    b.last_update_date < to_date('19/01/2011 02:10:00', 'dd/mm/yyyy hh24:mi:ss')
    GROUP BY TRUNC(b.last_update_date, 'mi');I'm not sure why you're bothering with the join to the oe_order_headers_all table, since you're not referencing that in the where clause or the selected columns list. I think you could probably do away with it.
    I've changed your code to take the last_update_date and truncate it to the minute level, and added that as a column, so you can see which count goes with which minute. Obviously, this has to be in the group by.
    I've also changed your date comparisons so that you're actually comparing dates to dates, rather than strings to strings - why would you deliberately take information away from the optimizer? Oracle does not treat strings the same as dates, and forcing it to use strings rather than dates could lead you to have a vastly differing execution path, which will most likely be less performant.
    Not to mention, coding like that leads you to assume that you can compare dates in strings without any problems, and that is just not the case. '19-FEB-2011' is counted as being earlier than '19-JAN-2008', as strings sort alphabetically.

Maybe you are looking for