Gets coherent

Hello

Server Info:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
Linux 2.6.18 - 164.el5

I have doubt as to him makes more sense that is very confusing.
The table 't2' has 4 blocks from 8 allocated blocks, and when I do a ' select *' he goes hard analysis and becomes coherent is 110.
In the second run he goes to a soft parse and have checked the 4 blocks of data, which is fine.
And when I do 'count (*)' of the consistent GETS is 3.

1. why's consistent is 110 in the first select statement?
2 when I did 'count (*)' t - he checked 3 blocks?
3. If so, why he checked 3 blocks instead of 4?

Can you guys please throw some light on this or guide me to some documents on this.

SQL > select blocks, empty_blocks from dba_tables where table_name = 'T2 ';

BLOCKS EMPTY_BLOCKS
---------- ------------
4 4

SQL > select blocks, extensions of dba_segments where nom_segment = 'T2 ';

EXTENSIONS OF BLOCKS
---------- ----------
8 1

SQL > set autotrace traceonly;
SQL > select * from t2;

16 selected lines.


Execution plan
----------------------------------------------------------
Hash value of plan: 1513984157

--------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | 16. 2000. 3 (0) | 00:00:01 |
| 1. TABLE ACCESS FULL | T2 | 16. 2000. 3 (0) | 00:00:01 |
--------------------------------------------------------------------------


Statistics
----------------------------------------------------------
740 recursive calls
0 db block Gets
Gets 110 consistent
0 physical reads
0 redo size
4316 bytes sent via SQL * Net to client
395 bytes received via SQL * Net from client
3 SQL * Net back and forth to and from the client
4 sorts (memory)
0 sorts (disk)
16 rows processed

SQL > select * from t2;

16 selected lines.


Execution plan
----------------------------------------------------------
Hash value of plan: 1513984157

--------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | 16. 2000. 3 (0) | 00:00:01 |
| 1. TABLE ACCESS FULL | T2 | 16. 2000. 3 (0) | 00:00:01 |
--------------------------------------------------------------------------


Statistics
----------------------------------------------------------
0 recursive calls
0 db block Gets
4 consistent gets
0 physical reads
0 redo size
4316 bytes sent via SQL * Net to client
395 bytes received via SQL * Net from client
3 SQL * Net back and forth to and from the client
0 sorts (memory)
0 sorts (disk)
16 rows processed

SQL > select count (*) T2;


Execution plan
----------------------------------------------------------
Hash value of plan: 3321871023

-------------------------------------------------------------------
| ID | Operation | Name | Lines | Cost (% CPU). Time |
-------------------------------------------------------------------
| 0 | SELECT STATEMENT | 1. 3 (0) | 00:00:01 |
| 1. GLOBAL TRI | 1 | | |
| 4: TABLE ACCESS FULL | T2 | 16. 3 (0) | 00:00:01 |
-------------------------------------------------------------------


Statistics
----------------------------------------------------------
1 recursive calls
0 db block Gets
3 consistent gets
0 physical reads
0 redo size
411 bytes sent via SQL * Net to client
384 bytes received via SQL * Net from client
2 SQL * Net back and forth to and from the client
0 sorts (memory)
0 sorts (disk)
1 rows processed

SQL > set autotrace off

Well, see this demo and hope that makes things clear for you.

SQL> create table test as select * from dba_objects;

Table created.

SQL> exec dbms_stats.gather_table_stats(user,'TEST');

PL/SQL procedure successfully completed.

SQL> exec show_space('TEST');
Unformatted Blocks .....................               0
FS1 Blocks (0-25)  .....................               0
FS2 Blocks (25-50) .....................               0
FS3 Blocks (50-75) .....................               0
FS4 Blocks (75-100).....................               0
Full Blocks        .....................           1,033
Total Blocks............................           1,152
Total Bytes.............................       9,437,184
Total MBytes............................               9
Unused Blocks...........................              93
Unused Bytes............................         761,856
Last Used Ext FileId....................               4
Last Used Ext BlockId...................           4,352
Last Used Block.........................              35

PL/SQL procedure successfully completed.

SQL> set arraysize 100
SQL> select * from test;

72585 rows selected.

Statistics
----------------------------------------------------------
          1  recursive calls
          0  db block gets
       1758  consistent gets
       1033  physical reads
          0  redo size
    7514365  bytes sent via SQL*Net to client
       8394  bytes received via SQL*Net from client
        727  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
      72585  rows processed

SQL> /

72585 rows selected.

Statistics
----------------------------------------------------------
          0  recursive calls
          0  db block gets
       1758  consistent gets
         84  physical reads
          0  redo size
    7514365  bytes sent via SQL*Net to client
       8394  bytes received via SQL*Net from client
        727  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
      72585  rows processed
SQL>set autot off
SQL> select (72585/100) + 1033 from dual;

(72585/100)+1033
----------------
         1758.85

SQL>

So, it's the exact number who came to the top, right!

Now, for the aggregate as County, oracle would just touch all the blocks. Let's see that again. Busy blocks are 1033, it should be the number of conistent gets.

SQL> select count(*) from test;

Statistics
----------------------------------------------------------
          1  recursive calls
          0  db block gets
       1036  consistent gets
       1033  physical reads
          0  redo size
        424  bytes sent via SQL*Net to client
        419  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          1  rows processed

SQL> 

Located on the money, isn't it!

HTH
Aman...

Tags: Database

Similar Questions

  • Reduce gets consistent - tune this sql

    the executions of the query is high in my database, and gets buffer are almost 5K by running, is it possible to resolve the application

    SELECT ic.issue_code_name
    Of iss_code ic, iss_code_grp_map m, work_categories wc
    WHERE ic.issue_code_id = m.issue_code_id AND
    m.issue_code_group_id = wc.issue_code_group_id AND
    IC.issue_reporting_code = 1000 AND wc. Main_id = 1 and
    rownum = 1;

    -------------------------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    -------------------------------------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 1. 58. 27 (4) | 00:00:01 |
    |* 1 | COUNTY STOPKEY |
    | 2. NESTED LOOPS |
    | 3. NESTED LOOPS | 1. 58. 27 (4) | 00:00:01 |
    |* 4 | HASH JOIN | 101 | 2424 | 7 (15) | 00:00:01 |
    |* 5 | VIEW | the index $ _join$ _003 | 73. 584. 3 (34) | 00:00:01 |
    |* 6 | HASH JOIN |
    |* 7 | INDEX RANGE SCAN | I_WC_Main_id_ID_IS_ACTIVE | 73. 584. 2 (50) | 00:00:01 |
    |* 8 | FULL RESTRICTED INDEX SCAN FAST | I_WC_ISSUE_CODE_GROUP_ID | 73. 584. 1 (0) | 00:00:01 |
    | 9. MAT_VIEW FULL ACCESS | iss_code_grp_map | 563. 4504 | 4 (0) | 00:00:01 |
    | * 10 | INDEX UNIQUE SCAN | PK_iss_code | 1 | | 1 (0) | 00:00:01 |
    | * 11 | MAT_VIEW ACCESS BY INDEX ROWID | iss_code | 1. 34. 1 (0) | 00:00:01 |
    -------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    1 - filter (ROWNUM = 1)
    4 - access("M".") ISSUE_CODE_GROUP_ID '=' WC '. ("' ISSUE_CODE_GROUP_ID")
    5 - filter("WC".") Main_id "= 1)
    6 - access (ROWID = ROWID)
    7 - access("WC".") Main_id "= 1)
    8 - filter("WC".") ISSUE_CODE_GROUP_ID' IS NOT NULL)
    10 - access("IC".") "ISSUE_CODE_ID" ="O" ISSUE_CODE_ID')
    11 filter (TO_NUMBER ("IC". "ISSUE_REPORTING_CODE") = 1000) "
    Statistics
    ----------------------------------------------------------
    1 recursive calls
    0 db block Gets
    4349 gets coherent
    physical reads 91
    0 redo size
    339 bytes sent via SQL * Net to client
    513 bytes received via SQL * Net from client
    1 SQL * Net back and forth to and from the client
    0 sorts (memory)
    0 sorts (disk)
    0 rows processed

    Enter the value for the table_name: iss_code

    INDEX_OWNER INDEX_NAME COLUMN_NAME POSITION_COLONNE
    ------------------------------ ---------------------------------------- ---------------------------------------- ---------------
    BOOKER I_IC_LEG_CONT_REA_ID LEGACY_CONTACT_REASON_ID 1
    BOOKER PK_iss_code ISSUE_CODE_ID 1

    Enter the value for the table_name: iss_code_grp_map

    INDEX_OWNER INDEX_NAME COLUMN_NAME POSITION_COLONNE
    ------------------------------ ---------------------------------------- ---------------------------------------- ---------------
    BOOKER I_ICGM_ISSUE_CODE_GROUP_ID ISSUE_CODE_GROUP_ID 1
    BOOKER PK_iss_code_grp_map iss_code_grp_map_ID 1

    Enter the value for the table_name: work_categories

    INDEX_OWNER INDEX_NAME COLUMN_NAME POSITION_COLONNE
    ------------------------------ ---------------------------------------- ---------------------------------------- ---------------
    BOOKER I_WC_ISSUE_CODE_GROUP_ID ISSUE_CODE_GROUP_ID 1

    BOOKER I_WC_Main_id_ID_IS_ACTIVE Main_id 1
    BOOKER I_WC_Main_id_ID_IS_ACTIVE IS_ACTIVE 2

    BOOKER PK_WORK_CATEGORIES WORK_CATEGORY_ID 1

    BOOKER UI_WC_NAME_Main_id NAME 1
    BOOKER UI_WC_NAME_Main_id Main_id 2

    I don't know why you reject to start my suggestions.

    By using the clause "is not null" you indicate that the column can be null. NULL values are not indexed you force Oracle do not to use the index.

    As for your second point: you say I'm a fool? The column is certainly in the where clause.
    Please re-read my response.

    ---------
    Sybrand Bakker
    Senior Oracle DBA

  • Calibration SMU 4330 problem

    I tried to calibrate the SMU-4330 and getting coherent errors when you try to Gain accuracy test of the calibration Procedure 4330/4331 Express SC OR

    For the three brand new 4330 cards, I get an error in table 5 of the manual for the outputs of calibrator: 295,8, 341,3, and 358,8, as well as an error in table 4 for the outputs of calibrator: 341,3 and 358,8.

    I am fairly confident that I am following the procedures correctly. I was using the 5220 recommended A Fluke calibrator and the cards past all the other verification tests except the Test of accuracy of Gain.

    Anyone have any ideas? Arrays of textbooks has been updated?

    Thanks in advance

    G'ory88,.

    Please use the forums OR! In fact, we found some errors in these tables. We are working to correct the document, but here's a rough revised table for you:

    I'm sorry for any inconvenience this has caused. Let me know if you're still having problems even with the table above.

    Katie

  • What is the size of table extraction

    Hello

    I saw it in the help online (integrated CREATE_GROUP_FROM_QUERY)

    "array_fetch_size specifies the fetch array size.  The default table size is 20. »

    -What is ' array_fetch_size '?

    I did some tests in sql * more to refer to some points:

    SQL> create table all_obj as select * from all_objects;
    

    A "TEST CASE".

    SQL> set autotrace traceonly statistics;
    SQL> set arraysize 1;
    SQL> select * from all_obj;
    

    Statistics

    ----------------------------------------------

    0 recursive calls

    0 db block Gets

    28524 consistent gets

    0 physical reads

    0 redo size

    5641932 bytes sent via SQL * Net to client

    309351 bytes received via SQL * Net from client

    28090 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    56178 rows processed

    B TEST CASE '

    SQL> set arraysize 100;
    SQL> select * from all_obj;
    

    Statistics

    ----------------------------------------------------------

    0 recursive calls

    0 db block Gets

    1364 gets coherent

    0 physical reads

    0 redo size

    2256142 bytes sent via SQL * Net to client

    6678 bytes received via SQL * Net from client

    563 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    56178 rows processed

    C "TEST CASE".

    SQL> set arraysize 5000;  /*the maximum val set in sql*plus*/
    SQL> select * from all_obj;
    

    Statistics

    ----------------------------------------------------------

    4 recursive calls

    0 db block Gets

    889 consistent gets

    0 physical reads

    0 redo size

    2188492 bytes sent via SQL * Net to client

    628 bytes received via SQL * Net from client

    13 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    56178 rows processed

    Notes: I've run the queries above several times that each of them and I noticed the same results.

  • Rownum and plan to see where Explain the terms > and <

    Hi people...

    I just wanted to share a comment... would make for a conceptual explanation on even!

    SQL > select * from v version $;

    BANNER

    -----------------------------------------------------------------------------

    Database Oracle 12 c Enterprise Edition Release 12.1.0.1.0 - 64 bit Production

    PL/SQL Release 12.1.0.1.0 - Production

    CORE Production 12.1.0.1.0

    AMT for 64-bit Windows: Version 12.1.0.1.0 - Production

    NLSRTL Version 12.1.0.1.0 - Production

    SQL > select count (*) in the tab_rownum where rownum < 2;

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 1301825293

    --------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Cost (% CPU). Time |

    --------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |            |     1.     2 (0) | 00:00:01 |

    |   1.  GLOBAL TRI |            |     1.            |          |

    |*  2 |   COUNT STOPKEY |            |       |            |          |

    |   3.    TABLE ACCESS FULL | TAB_ROWNUM |     1.     2 (0) | 00:00:01 |

    --------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------                                                                           

    2 - filter(ROWNUM<2)

    Statistics

    ----------------------------------------------------------

    1 recursive calls

    0 db block Gets

    3 consistent gets

    5 physical reads

    0 redo size

    542 bytes sent via SQL * Net to client

    543 bytes received via SQL * Net from client

    2 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    1 rows processed

    As most of us should be aware of, First_Rows_k optimization takes place for query Rownum... !!

    so for top query, the cardinality estimate is 1 and County stop happened key in the plan with filter as ROWNUM < 2.

    Now let's run under SQL.

    SQL > select count (*) in the tab_rownum where rownum > 2;

    In any case... above SQL will be not all output lines.

    As expected rownum is greater then 2... !!

    allows to check the plan!

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 141762995

    ---------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Cost (% CPU). Time |

    ---------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |            |     1.   425 (1) | 00:00:01 |

    |   1.  GLOBAL TRI |            |     1.            |          |

    |   2.   COUNTY |            |       |            |          |

    |*  3 |    FILTER |            |       |            |          |

    |   4.     TABLE ACCESS FULL | TAB_ROWNUM | 91740 |   425 (1) | 00:00:01 |

    ---------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    3 - filter(ROWNUM>2)

    Statistics

    ----------------------------------------------------------

    1 recursive calls

    0 db block Gets

    1529 gets coherent

    1526 physical reads

    If we check the cardinality estimates, this is the total of the lines of the table... That's why no First_Rows_K for this SQL optimization. (All_rows)

    Although we will not get all the lines... always full scan table oracle...

    Also... Button Count Stop has changed and filter + Count... !!

    Need to understand... Why not oracle have an output for logic > rownum conditions than zero!

    Why the filter for the second execution ends not SQL executions... it scan complete set... for lines nil!

    Thank you

    Deepak M.

    Hello

    WHERE ROWNUM > 2 is a very common mistake, but it's a mistake that most people make once, in development.  They learn that it does not work, and they don't again.  I expect Oracle to make the features so that unique development queries run faster.  They are probably more concerned about what kind of things people do every day, in the Production.

  • performance of the queries on the main tables of the materialized view vs

    Hello

    I'm afraid of strange behavior in db, on my paintings of master UDBMOVEMENT_ORIG (26mil.rows) and UDBIDENTDATA_ORIG (18mil.rows) is created the materialized view TMP_MS_UDB_MV (UDBMOVEMENT stands for this object) that meets certain default conditions and the join on these paintings of master condition. MV got on the lines of 12milions. I created MV for poll not so huge objects, MV got 3GB, paintings of master toghether 12 GB. But I don't understand that physical reads and becomes compatible is less on MV that on the main tables, the final execution time is shorter on the master tables. See my journal below.

    Why?

    Thanks for the replies.


    SQL > set echo on
    SQL > @flush
    SQL > alter system flush buffer_cache;

    Modified system.

    Elapsed time: 00:00:00.20
    SQL > alter system flush shared_pool;

    Modified system.

    Elapsed time: 00:00:00.65
    SQL > SELECT
    UDBMovement.zIdDevice 2, UDBMovement.sDevice, UDBMovement.zIdLocal, UDBMovement.sComputer, UDBMovement.tActionTime, UDBIdentData.sCardSubType, UDBIdentData.sCardType, UDBMovement.cEpan, UDBMovement.cText, UDBMovement.lArtRef, UDBMovement.sArtClassRef, UDBMovement.lSequenz, UDBMovement.sTransMark, UDBMovement.lBlock, UDBMovement.sTransType, UDBMovement.lGlobalID, UDBMovement.sFacility, UDBIdentData.sCardClass, UDBMovement.lSingleAmount, UDBMovement.sVAT, UDBMovement.lVATTot, UDBIdentData.tTarifTimeStart, UDBIdentData.tTarifTimeEnd, UDBIdentData.cLicensePlate, UDBIdentData.lMoneyValue, UDBIdentData.lPointValue, UDBIdentData.lTimeValue, UDBIdentData.tProdTime, UDBIdentData.tExpireDate
    UDBMOVEMENT_orig UDBMovement 3, Udbidentdata_orig UDBIdentData
    4. WHERE
    5 UDBMovement.lGlobalId = UDBIdentData.lGlobalRef (+) AND UDBMovement.sComputer = UDBIdentData.sComputer (+)
    6 AND UDBMovement.sTransType > 0 AND UDBMovement.sDevice < 1000 AND UDBMovement.sDevice > = 0 AND UDBIdentData.sCardType IN (2) AND (bitand(UDBMovement.sSaleFlag,1) = 0 AND bitand(UDBMovement.sSaleFlag,4) = 0) AND UDBMovement.sArtClassRef < 100
    7 AND UDBMovement.tActionTime > = TO_DATE (May 5, 2011 00:00:00 ',' dd/mm/yyyy hh24:mi:ss') + 0.25 AND UDBMovement.tActionTime < TO_DATE (May 5, 2011 00:00:00 ',' dd/mm/yyyy hh24:mi:ss') + 0.5
    8 ORDER BY tActionTime, lBlock, lSequenz;

    4947 selected lines.

    Elapsed time: 00:00:15.84

    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 1768406139

    ------------------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |
    ------------------------------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 7166 | 1238K | 20670 (1) | 00:04:09 |
    | 1. SORT ORDER BY | 7166 | 1238K | 1480K | 20670 (1) | 00:04:09 |
    | 2. NESTED LOOPS |
    | 3. NESTED LOOPS | 7166 | 1238K | 20388 (1) | 00:04:05 |
    |* 4 | TABLE ACCESS BY INDEX ROWID | UDBMOVEMENT_ORIG | 7142 | 809K | 7056 (1) | 00:01:25 |
    |* 5 | INDEX RANGE SCAN | IDX_UDBMOVARTICLE | 10709. 61 (0) | 00:00:01 |
    |* 6 | INDEX UNIQUE SCAN | UDBIDENTDATA_PRIM | 1 | | | 1 (0) | 00:00:01 |
    |* 7 | TABLE ACCESS BY INDEX ROWID | UDBIDENTDATA_ORIG | 1. 61. 2 (0) | 00:00:01 |
    ------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    4 - filter("UDBMOVEMENT".") STRANSTYPE"> 0 AND 'UDBMOVEMENT '. "" SDEVICE ' < 1000 AND
    BITAND ("SSALEFLAG", 1) = 0 AND "UDBMOVEMENT". "" SDEVICE ' > = 0 AND BITAND ("UDBMOVEMENT". "SSALEFLAG «(, 4) = 0)" "
    5 - access("UDBMOVEMENT".") TACTIONTIME' > = TO_DATE (' 2011-05-05 06:00 ',' syyyy-mm-jj)
    ('HH24:mi:SS) AND "UDBMOVEMENT". "' TACTIONTIME ', TO_DATE (' 2011-05-05 12:00 ',' syyyy-mm-jj)
    ('HH24:mi:SS) AND "UDBMOVEMENT". ("' SARTCLASSREF" < 100)
    filter ("UDBMOVEMENT". "SARTCLASSREF" < 100)
    6 - access("UDBMOVEMENT".") LGLOBALID "=" UDBIDENTDATA. " "" LGLOBALREF "AND
    'UDBMOVEMENT '. "' SCOMPUTER"="UDBIDENTDATA." ("' SCOMPUTER")
    7 - filter("UDBIDENTDATA".") SCARDTYPE "= 2)


    Statistics
    ----------------------------------------------------------
    543 recursive calls
    0 db block Gets
    84383 compatible Gets
    4485 physical reads
    0 redo size
    533990 bytes sent via SQL * Net to client
    3953 bytes received via SQL * Net from client
    331 SQL * Net back and forth to and from the client
    kinds of 86 (memory)
    0 sorts (disk)
    4947 lines processed

    SQL > @flush
    SQL > alter system flush buffer_cache;

    Modified system.

    Elapsed time: 00:00:00.12
    SQL > alter system flush shared_pool;

    Modified system.

    Elapsed time: 00:00:00.74
    SQL > SELECT UDBMovement.zIdDevice, UDBMovement.sDevice, UDBMovement.zIdLocal, UDBMovement.sComputer, UDBMovement.tActionTime, UDBMovement.sCardSubType, UDBMovement.sCardType, UDBMovement.cEpan, UDBMovement.cText, UDBMovement.lArtRef, UDBMovement.sArtClassRef, UDBMovement.lSequenz, UDBMovement.sTransMark, UDBMovement.lBlock, UDBMovement.sTransType, UDBMovement.lGlobalID, UDBMovement.sFacility, UDBMovement.sCardClass, UDBMovement.lSingleAmount, UDBMovement.sVAT, UDBMovement.lVATTot, UDBMovement.tTarifTimeStart, UDBMovement.tTarifTimeEnd, UDBMovement.cLicensePlate, UDBMovement.lMoneyValue, UDBMovement.lPointValue, UDBMovement.lTimeValue, UDBMovement.tProdTime
    2. OF UDBMOVEMENT WHERE
    3 UDBMovement.sTransType > 0 AND UDBMovement.sDevice < 1000 AND UDBMovement.sDevice > = 0 AND UDBMovement.sCardType IN (2) AND (bitand(UDBMovement.sSaleFlag,1) = 0 AND bitand(UDBMovement.sSaleFlag,4) = 0) AND UDBMovement.sArtClassRef < 100
    4. AND UDBMovement.tActionTime > = TO_DATE (May 5, 2011 00:00:00 ',' the hh24: mi: ss' dd/mm/yyyy) + 0.25
    5 AND UDBMovement.tActionTime < TO_DATE (May 5, 2011 00:00:00 ',' the hh24: mi: ss' dd/mm/yyyy) + 0.5 ORDER BY tActionTime, lBlock, lSequenz;

    4947 selected lines.

    Elapsed time: 00:00:26.46

    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 3648898312

    -----------------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    -----------------------------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 2720 | 443K | 2812 (1) | 00:00:34 |
    | 1. SORT ORDER BY | 2720 | 443K | 2812 (1) | 00:00:34 |
    |* 2 | MAT_VIEW ACCESS BY INDEX ROWID | TMP_MS_UDB_MV | 2720 | 443K | 2811 (1) | 00:00:34 |
    |* 3 | INDEX RANGE SCAN | EEETMP_MS_ACTTIMEDEVICE | 2732 | 89 (0) | 00:00:02 |
    -----------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    2 - filter("UDBMOVEMENT".") STRANSTYPE"> 0 AND BITAND ("UDBMOVEMENT". "SSALEFLAG «(, 4) = 0 AND" "
    BITAND ("SSALEFLAG", 1) = 0 AND "UDBMOVEMENT". ("' SARTCLASSREF" < 100)
    3 - access("UDBMOVEMENT".") TACTIONTIME' > = TO_DATE (' 2011-05-05 06:00 ',' syyyy-mm-jj)
    ('HH24:mi:SS) AND "UDBMOVEMENT". "" SDEVICE ' > = 0 AND "UDBMOVEMENT". ' SCARDTYPE ' = 2 AND ".
    'UDBMOVEMENT '. "" TACTIONTIME "< TO_DATE(' 2011-05-05 12:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
    'UDBMOVEMENT '. ("' SDEVICE ' < 1000)
    filter ("UDBMOVEMENT". "SCARDTYPE"= 2 AND "UDBMOVEMENT"." SDEVICE' < 1000 AND
    'UDBMOVEMENT '. ("' SDEVICE ' > = 0)


    Statistics
    ----------------------------------------------------------
    449 recursive calls
    0 db block Gets
    6090 gets coherent
    2837 physical reads
    0 redo size
    531987 bytes sent via SQL * Net to client
    3953 bytes received via SQL * Net from client
    331 SQL * Net back and forth to and from the client
    168 sorts (memory)
    0 sorts (disk)
    4947 lines processed

    SQL > spool off

    Published by: MattSk on February 4, 2013 14:20

    >
    The second query makes a full table of materialized view scan.
    >
    What you base that statement on?

    I do not see any table full scan in terms of the second query. All I see is
    >
    * 2 MAT_VIEW ACCESS BY INDEX ROWID TMP_MS_UDB_MV 2720 443K 2811 (1) 00:00:34

  • Using the index to extract data without filter predicate

    Hello

    does anyone have an explanation for the following scenario:

    I have a table T1 with an OID_IX index on column (object_id) - the table is a DEC dba_objects just to fill it with data.
    There are no other current index. The table and index are analysed.

    When I run the following query, the table is available in FULL (without using the index)

    SELECT OBJECT_ID FROM T1;

    SQL > select object_id from t1;

    485984 selected lines.

    Elapsed time: 00:00:01.76

    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 3617692013

    --------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    --------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 485K | 2372K | 1528 (1) | 00:00:19 |
    | 1. TABLE ACCESS FULL | T1 | 485K | 2372K | 1528 (1) | 00:00:19 |
    --------------------------------------------------------------------------


    Statistics
    ----------------------------------------------------------
    1 recursive calls
    0 db block Gets
    7396 gets coherent
    0 physical reads
    0 redo size
    2887158 bytes sent via SQL * Net to client
    5684 bytes received via SQL * Net from client
    487 SQL * Net back and forth to and from the client
    0 sorts (memory)
    0 sorts (disk)
    485984 rows processed



    But if I add a predicate (even if it is useless in this case) the index is taken and that the query runs faster:



    JDBC@toekb > select object_id from t1 where object_id. = - 999;

    485960 selected lines.

    Elapsed time: 00:00:01.40

    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 3555700789

    -------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    -------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 485K | 2372K | 242 (3) | 00:00:03 |
    |* 1 | FULL RESTRICTED INDEX SCAN FAST | OID_IX | 485K | 2372K | 242 (3) | 00:00:03 |
    -------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    1 Filter ("OBJECT_ID" <>-(999))


    Statistics
    ----------------------------------------------------------
    1 recursive calls
    0 db block Gets
    1571 gets coherent
    0 physical reads
    0 redo size
    2766124 bytes sent via SQL * Net to client
    5684 bytes received via SQL * Net from client
    487 SQL * Net back and forth to and from the client
    0 sorts (memory)
    0 sorts (disk)
    485960 rows processed


    Here is my setup:

    SQLsql-
    drop table t1 purge;
    create table t1 tablespace users in select * from dba_objects;
    Insert into t1 (select * from t1);
    commit;
    Insert into t1 (select * from t1);
    commit;
    Insert into t1 (select * from t1);
    commit;
    create index oid_ix on t1 (object_id) tablespace users;
    exec dbms_stats.gather_table_stats (null, 't1', cascade = > true, estimate_percent = > 100);
    SQLsql-

    In my case, the Table and the Index looks like this way:

    JDBC@toekb > select table_name, NUM_ROWS, BLOCKS, AVG_SPACE from user_tables;

    TABLE_NAME, NUM_ROWS BLOCKS AVG_SPACE
    =======================================
    485984 6944 T1 0

    Elapsed time: 00:00:00.11
    JDBC@toekb > select INDEX_NAME, BLEVEL, LEAF_BLOCKS, DISTINCT_KEYS, NUM_ROWS user_indexes.

    INDEX_NAME BLEVEL LEAF_BLOCKS DISTINCT_KEYS NUM_ROWS
    ===================================================
    2 1074 60745 485960 OID_IX

    Elapsed time: 00:00:00.07

    The table contains 7 times more than the index blocks!


    any answer welcome

    Best regards

    Published by: guenterp on August 12, 2010 14:44

    The column is not defined as NOT NULL, then there may be values that are not in the index (because the index does not include null values). The useless predicate implies NOT NULL, then the index may be used.

  • Really basic - need help with interpreting the result autotrace

    I am reviewing tunning of database to verify the effectiveness of my sql statements and I think AUTOTRACE is the first thing to look into.

    I created two identical tables containing 250,000 lines. First of all, there is no evidence of a fact

    SET AUTOTRACE ON
    SELECT * FROM TEST_250000
    WHERE CUSTOMER_NO > 241000.

    Hash value of plan: 4257243307

    ---------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ---------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 15353 | 2623K | 750 (2) | 00:00:10 |
    |* 1 | TABLE ACCESS FULL | TEST_250000 | 15353 | 2623K | 750 (2) | 00:00:10 |
    ---------------------------------------------------------------------------------


    Statistics
    -----------------------------------------------------------
    0 recursive calls
    0 db block Gets
    2687 gets coherent
    0 physical reads
    0 redo size
    390398 bytes sent via SQL * Net to client
    427 bytes received via SQL * Net from client
    12 SQL * Net back and forth to and from the client
    1 sorts (memory)
    0 sorts (disk)


    Hash value of plan: 174749588
    -------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    -------------------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 9000 | 606K | 121 (1) | 00:00:02 |
    | 1. TABLE ACCESS BY INDEX ROWID | TEST_250000_INDEX | 9000 | 606K | 121 (1) | 00:00:02 |
    |* 2 | INDEX RANGE SCAN | TEST_250000 | 9000 | 22 (0) | 00:00:01 |
    -------------------------------------------------------------------------------------------------

    Statistics
    -----------------------------------------------------------
    0 recursive calls
    0 db block Gets
    Gets 89 consistent
    0 physical reads
    0 redo size
    390399 bytes sent via SQL * Net to client
    433 bytes received via SQL * Net from client
    12 SQL * Net back and forth to and from the client
    1 sorts (memory)
    0 sorts (disk)

    My questions are the following:

    (1) I am assuming that the right time to run the first query is 0.2 sec and costs 1500, while the other is 0.05 second and 164. You simply add to the top?
    2.) which means the cost? I mean what is the unit of it?
    3.) there is a substantial difference in gets consistent. I found a definition (Gets the number of times that a consistent read was requested for a block). Could someone explain what it means to me and why is it so different in the two queries.
    4.) what is the hash value of Plan on?

    Know that it's a lot, but any help appreciated.

    PS: I am posting this in general, but y at - it a forum specializing in the tunning?

    Jana Kralova wrote:
    I am reviewing tunning of database to verify the effectiveness of my sql statements and I think AUTOTRACE is the first thing to look into.

    Uitilities TRACE and TKPROF are even better.

    My questions are the following:

    (1) I am assuming that the right time to run the first query is 0.2 sec and costs 1500, while the other is 0.05 second and 164. You simply add to the top?
    2.) which means the cost? I mean what is the unit of it?

    By comparing the cost of two queries is not something that you should focus.
    See: http://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:313416745628
    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:956029960417

    3.) there is a substantial difference in gets consistent. I found a definition (Gets the number of times that a consistent read was requested for a block). Could someone explain what it means to me and why is it so different in the two queries.

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:6643159615303

    4.) what is the hash value of Plan on?

    "The NUMBER of PLAN_HASH_VALUE digital representation of the SQL plan for this cursor. Comparing a PLAN_HASH_VALUE to another easily identifies whether two plans are the same (rather than comparing two plans line by line). »
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/dynviews_2113.htm#REFRN30246

    Oracle Performance Tuning Guide can be found here:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14211/TOC.htm

    Know that it's a lot, but any help appreciated.

    Refer to the documentation (according to the version of your database) @
    http://www.Oracle.com/pls/db102/homepage
    http://www.Oracle.com/pls/db112/homepage
    or start @.
    http://Tahiti.Oracle.com
    and your own research on http://asktom.oracle.com, you will find many examples and explanations.

    PS: I am posting this in general, but y at - it a forum specializing in the tunning?

    I think that you are in the right forum ;)

  • Slow cube request

    Hi there again,

    Well I finally managed to get my OLAP cube that is done, I can now play with it in the answers, so things are moving along. However I now seem to have a performance problem when creating views in the responses. A view requires generally a minute to calculate, which seems fine to me, knowing that the original fact table on which is built the cube has only 200 k lines.

    Here is for example the text of a SQL query submitted by responses to the Oracle 11 g server, which returns lines of ten in a minute about:
    =================================================
    SELECT t1936.sh_long_description AS t1936.cd_long_description AS c6, c5,
    t1936.bl_long_description AS c7
    Of exitcs_view t1992,.
    dttm_view t1968,
    bnumber_view t1936,
    anumber_view t1904,
    traffic_view t2001
    WHERE (t1936.dim_key = t2001.bnumber
    AND t1904.dim_key = t2001.anumber
    AND t1968.dim_key = t2001.dttm
    AND t1904.level_name = do SH'
    AND t1936.cd_long_description = N "212"
    AND t1936.level_name = BL'
    AND t1936.sh_long_description = SHORTS '
    AND t1968.level_name = ALLDT'
    AND t1992.dim_key = t2001.exitcs
    AND t1992.level_name = ' do ALLCS
    );
    =================================================
    and the info autotrace resulting:
    =================================================
    ----------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------
    | 0 | SELECT STATEMENT | 1. 100. 29 (0) | 00:00:01 |
    | 1. JOINED THE PARTIAL EXTERNAL ANALYSIS CUBE | |
    | 2. ACCESS CUBE | TRAFFIC |
    | 3. ACCESS CUBE | ANUMBER.
    | 4. ACCESS CUBE | BNUMBER |
    | 5. ACCESS CUBE | DTMC |
    |* 6 | ACCESS CUBE | EXITCS | 1. 100. 29 (0) | 00:00:01 |
    ------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    6 - filter (SYS_OP_C2C (SYS_OP_ATG (VALUE(KOKBF$), 31,32, 2)) = U 'SH' AND)
    SYS_OP_C2C (SYS_OP_ATG (VALUE(KOKBF$), 24,25, 2)) = U '212' AND
    SYS_OP_C2C (SYS_OP_ATG (VALUE(KOKBF$), 15,16, 2)) = U "BL" AND
    SYS_OP_C2C (SYS_OP_ATG (VALUE(KOKBF$), 23,24, 2)) = 'SHORT' U AND
    SYS_OP_C2C (SYS_OP_ATG (VALUE(KOKBF$), 55.56, 2)) = U "ALLDT" AND
    SYS_OP_C2C (SYS_OP_ATG (VALUE(KOKBF$), 5.6, 2)) = U 'ALLCS')

    Statistics
    ----------------------------------------------------------
    8176 recursive calls
    1580 db block Gets
    5195 gets coherent
    856 physical reads
    Redo 258396 size
    542 bytes sent via SQL * Net to client
    360 bytes received via SQL * Net from client
    2 SQL * Net back and forth to and from the client
    kinds of 79 (memory)
    0 sorts (disk)
    10 rows processed
    =================================================

    and the trace:

    =================================================
    call the query of disc elapsed to cpu count current lines
    ----------------------------------------------
    Parse 1 0.08 0.11 3 766 298 0
    Run 1 0.00 0.00 2 15 0 0
    Pick 2 61.84 61,96 1 795 0 10
    ----------------------------------------------
    Total 4 61.93 62,08 6 1576 298 10

    Chess in the library during parsing cache: 1
    Optimizer mode: ALL_ROWS
    The analysis of the user id: 90

    Rows Row Source operation
    ----------------------------------------------
    10 JOINT CUBE SCAN (cr = 965 pr = 3 pw = time 0 = 0 US cost = size 29 = 100 cards = 1).
    =================================================

    Can someone place a problem here? I think that this kind of queries against the dimensions of a cube must be almost instantaneous, but it feels like here, the server is a "full table scan" of some sort.

    Thanks again,
    Christian
  • What gets the relationship between the number of blocks and coherent?

    SQL> CREATE TABLE TEST(ID INT ,NAME VARCHAR2(10));
    
    SQL> CREATE INDEX IND_IDN ON TEST(ID);
    
    SQL> BEGIN
      2  FOR I IN 1 .. 1000
      3  LOOP
      4  EXECUTE IMMEDIATE 'INSERT INTO TEST VALUES('||I||',''LONION'')';
      5  END LOOP;
      6  COMMIT;
      7  END;
      8  /
    
    SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS(USER,'TEST',CASCADE=>TRUE);
    
    SQL> SELECT DISTINCT DBMS_ROWID.rowid_block_number(ROWID) BLOCKS FROM TEST;
    BLOCKS
    -----------
    61762
    61764
    61763         
    
               >> above , there have 3 blocks in table TEST .
    
    SQL> SET AUTOTRACE TRACEONLY;                                     
    
    SQL> SELECT * FROM TEST;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 1357081020                                                     
                                                                                    
    --------------------------------------------------------------------------      
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |      
    --------------------------------------------------------------------------      
    |   0 | SELECT STATEMENT  |      |  1000 | 10000 |     2   (0)| 00:00:01 |      
    |   1 |  TABLE ACCESS FULL| TEST |  1000 | 10000 |     2   (0)| 00:00:01 |      
    --------------------------------------------------------------------------      
    
    
    Statistics information
    ----------------------------------------------------------                      
              0  recursive calls                                                    
              0  db block gets                                                      
             72  consistent gets                                    >>  there have 72  consistent gets                  
              0  physical reads                                                     
              0  redo size                                                          
          24957  bytes sent via SQL*Net to client                                   
           1111  bytes received via SQL*Net from client                             
             68  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
           1000  rows processed                                                     
    
    SQL> SELECT /*+ INDEX_FFS(TEST IND_IDN)*/ * FROM TEST WHERE ID IS NOT NULL;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 1357081020                                                     
                                                                                    
    --------------------------------------------------------------------------      
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |      
    --------------------------------------------------------------------------      
    |   0 | SELECT STATEMENT  |      |  1000 | 10000 |     2   (0)| 00:00:01 |      
    |*  1 |  TABLE ACCESS FULL| TEST |  1000 | 10000 |     2   (0)| 00:00:01 |      
    --------------------------------------------------------------------------      
                                                                                    
    Predicate Information (identified by operation id):                             
    ---------------------------------------------------                             
                                                                                    
       1 - filter("ID" IS NOT NULL)                                                 
    
    
    Statistics information
    ----------------------------------------------------------                      
              1  recursive calls                                                    
              0  db block gets                                                      
             72  consistent gets                                   >>  there have 72  consistent gets                  
              0  physical reads                                                     
              0  redo size                                                          
          17759  bytes sent via SQL*Net to client                                   
           1111  bytes received via SQL*Net from client                             
             68  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
           1000  rows processed                                                     
    
                                             
    
    SQL> SELECT COUNT(*) FROM TEST;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 1950795681                                                     
                                                                                    
    -------------------------------------------------------------------             
    | Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |             
    -------------------------------------------------------------------             
    |   0 | SELECT STATEMENT   |      |     1 |     2   (0)| 00:00:01 |             
    |   1 |  SORT AGGREGATE    |      |     1 |            |          |             
    |   2 |   TABLE ACCESS FULL| TEST |  1000 |     2   (0)| 00:00:01 |             
    -------------------------------------------------------------------             
    
    Statistics information
    ----------------------------------------------------------                      
              0  recursive calls                                                    
              0  db block gets                                                      
              5  consistent gets                                      >>  there have 5  consistent gets               
              0  physical reads                                                     
              0  redo size                                                          
            408  bytes sent via SQL*Net to client                                   
            385  bytes received via SQL*Net from client                             
              2  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
              1  rows processed                                                     
    
                                                  
    
    SQL> SELECT COUNT(*) FROM TEST WHERE ID IS NOT NULL;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 735384656                                                      
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                    
    | Id  | Operation             | Name    | Rows  | Bytes | Cost (%CPU)| Time     
    |                                                                               
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                    
    |   0 | SELECT STATEMENT      |         |     1 |     4 |     2   (0)| 00:00:01 
    |                                                                               
                                                                                    
    |   1 |  SORT AGGREGATE       |         |     1 |     4 |            |          
    |                                                                               
                                                                                    
    |*  2 |   INDEX FAST FULL SCAN| IND_IDN |  1000 |  4000 |     2   (0)| 00:00:01 
    |                                                                               
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                                                                                                
    Predicate Information (identified by operation id):                             
    ---------------------------------------------------                             
                                                                                    
       2 - filter("ID" IS NOT NULL)                                                 
    
    
    Statistics information
    ----------------------------------------------------------                      
              0  recursive calls                                                    
              0  db block gets                                                      
              5  consistent gets                                                >>  there have 5 consistent gets     
              0  physical reads                                                     
              0  redo size                                                          
            408  bytes sent via SQL*Net to client                                   
            385  bytes received via SQL*Net from client                             
              2  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
              1  rows processed                                                     
    
                                              
    
    SQL> SELECT COUNT(ID) FROM TEST WHERE ID IS NOT NULL;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 735384656                                                      
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                    
    | Id  | Operation             | Name    | Rows  | Bytes | Cost (%CPU)| Time     
    |                                                                               
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                    
    |   0 | SELECT STATEMENT      |         |     1 |     4 |     2   (0)| 00:00:01 
    |                                                                               
                                                                                    
    |   1 |  SORT AGGREGATE       |         |     1 |     4 |            |          
    |                                                                               
                                                                                    
    |*  2 |   INDEX FAST FULL SCAN| IND_IDN |  1000 |  4000 |     2   (0)| 00:00:01 
    |                                                                               
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                                                                                              
    Predicate Information (identified by operation id):                             
    ---------------------------------------------------                             
                                                                                    
       2 - filter("ID" IS NOT NULL)                                                 
    
    
    Statistics information
    ----------------------------------------------------------                      
              0  recursive calls                                                    
              0  db block gets                                                      
              5  consistent gets                                        >>  there have 5  consistent gets             
              0  physical reads                                                     
              0  redo size                                                          
            409  bytes sent via SQL*Net to client                                   
            385  bytes received via SQL*Net from client                             
              2  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
              1  rows processed                                                     
    QUESTION:

    What gets the relationship between the number of blocks and coherent? How to calculate become consistent?

    You can see that your uniform is getting down to 6 to 12, is it not? Reading of the below thread Asktom.
    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:880343948514

    Aman...

  • Update statement is a coherent lof 'Get '.

    Hello

    When I run this update statement, it generates a lot of 'get in line ':

    UPDATE PFA_FUSIONFACC WAS

    SET (COD_FACTURA, TOT_CARGO_DB, TOT_CARGO_FB) =

    (SELECT THE NPC. COD_FACTUcaRA AS COD_FACTURA, NPC. TOT_BASEIMPO_E AS TOT_BASEIMPO, NPC. TOT_IMPEMI AS TOT_IMPEMI

    OF NPC, CTA AUX_CTAFACTU PFA_NPCOFACTMES

    where LTC. CTA_FACTURAC = WAS. CTA_FACTURAC

    AND NPC.cod_postal = CTA.cod_postal

    AND NPC.cta_facturac = CTA.cta_facturac)

    where FUS.rowid in

    (SELECT WAS.) ROWID

    NPC PFA_NPCOFACTMES, CTA AUX_CTAFACTU, WAS PFA_FUSIONFACC

    where LTC. CTA_FACTURAC = WAS. CTA_FACTURAC

    AND NPC.cod_postal = CTA.cod_postal

    AND NPC.cta_facturac = CTA.cta_facturac

    AND ROWNUM < 10000);

    9999 filas actualizadas.

    Passed: 01:38:15.47

    Run plan

    ----------------------------------------------------------

    Hash value of plan: 2048200947

    ----------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                | Lines | Bytes | TempSpc | Cost (% CPU). Time | Pstart. Pstop |

    ----------------------------------------------------------------------------------------------------------------------------------

    |   0 | UPDATE STATEMENT.                     |     1.    62.       |   117 KB (4) | 00:23:27 |       |       |

    |   1.  UPDATE                            | PFA_FUSIONFACC |       |       |       |            |          |       |       |

    |   2.   NESTED LOOPS |                     |     1.    62.       |   117 KB (4) | 00:23:27 |       |       |

    |   3.    VIEW                            | VW_NSO_1 |  9999 |   117 KB |       |   117 KB (4) | 00:23:27 |       |       |

    |   4.     UNIQUE FATE |                     |     1.   478K |       |            |          |       |       |

    |*  5 |      COUNT STOPKEY |                     |       |       |       |            |          |       |       |

    |*  6 |       HASH JOIN |                     |   774K |    36 M |    86 M |   117 KB (4) | 00:23:27 |       |       |

    |   7.        NESTED LOOPS |                     |  2258K |    60 M |       |   101K (4) | 00:20:16 |       |       |

    |   8.         RANGE OF PARTITION ALL THE |                     |  2258K |    32 M |       |  2554 (2) | 00:00:31 |     1.   338.

    |   9.          FULL RESTRICTED INDEX SCAN FAST | PFA_NPCOFACTMES_103 |  2258K |    32 M |       |  2554 (2) | 00:00:31 |     1.   338.

    | * 10 |         INDEX UNIQUE SCAN | PK_AUX_CTAFACTU |     1.    13.       |     2 (0) | 00:00:01 |       |       |

    |  11.        FULL RESTRICTED INDEX SCAN FAST | PFA_FUSIONFACC_I01 |  3923K |    78 M |       |  5358 (2) | 00:01:05 |       |       |

    |  12.    TABLE ACCESS BY ROWID USER | PFA_FUSIONFACC |     1.    50.       |     1 (0) | 00:00:01 |       |       |

    |  13.   TABLE ACCESS BY LOCAL INDEX ROWID | PFA_NPCOFACTMES |     1.    56.       |     2 (0) | 00:00:01 |     1.     1.

    |  14.    NESTED LOOPS |                     |     1.    69.       |    49 (0) | 00:00:01 |       |       |

    | * 15 |     INDEX SKIP SCAN | PK_AUX_CTAFACTU |     1.    13.       |    47 (0) | 00:00:01 |       |       |

    |  16.     RANGE OF PARTITION ITERATOR.                     |     1.       |       |     1 (0) | 00:00:01 |   KEY |   KEY |

    | * 17.      INDEX RANGE SCAN | PFA_NPCOFACTMES_103 |     1.       |       |     1 (0) | 00:00:01 |   KEY |   KEY |

    ----------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    5 - filter(ROWNUM<10000)

    6 - access("CTA".") CTA_FACTURAC "=" WAS ". ("' CTA_FACTURAC")

    10 - access("NPC".") COD_POSTAL "=" CTA ". "" COD_POSTAL "AND"NPC ". "" CTA_FACTURAC "=" CTA ". ("' CTA_FACTURAC")

    15 - access("CTA".") CTA_FACTURAC "(=:B1)"

    filter ("CTA". "CTA_FACTURAC"(=:B1) "

    17 - access("NPC".") COD_POSTAL "=" CTA ". "" COD_POSTAL "AND"NPC ". "CTA_FACTURAC"(=:B1) "

    filter ("NPC". "" CTA_FACTURAC "=" CTA ". ("' CTA_FACTURAC")

    And statistics

    ----------------------------------------------------------

    1 recursive calls

    13252 db block Gets

    200711795 compatible Gets

    407276 physical reads

    Redo 3550216 size

    837 bytes sent via SQL * Net to client

    1320 bytes received via SQL * Net from client

    3 SQL * Net back and forth to and from the client

    2 sorts (memory)

    0 sorts (disk)

    9999 rows processed

    Rollback Terminado.

    But the query used by the update is much less "gets":

    SQL > SELECT WAS. ROWID

    NPC PFA_NPCOFACTMES, CTA AUX_CTAFACTU, WAS PFA_FUSIONFACC

    2 where 3 DEC. CTA_FACTURAC = WAS. CTA_FACTURAC

    AND NPC.cod_postal = CTA.cod_postal

    4 5 AND NPC.cta_facturac = CTA.cta_facturac

    AND ROWNUM < 10000 6;

    9999 filas seleccionadas.

    Passed: 00:00:20.57

    Run plan

    ----------------------------------------------------------

    Hash value of plan: 20234272

    -----------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                | Lines | Bytes | TempSpc | Cost (% CPU). Time | Pstart. Pstop |

    -----------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                     |  9999 |   937K |       | 29298 (2) | 00:05:52 |       |       |

    |*  1 |  COUNT STOPKEY |                     |       |       |       |            |          |       |       |

    |*  2 |   HASH JOIN |                     |   774K |    70 M |    58 M | 29298 (2) | 00:05:52 |       |       |

    |   3.    RANGE OF PARTITION ALL THE |                     |  2258K |    32 M |       |  2554 (2) | 00:00:31 |     1.   338.

    |   4.     FULL RESTRICTED INDEX SCAN FAST | PFA_NPCOFACTMES_103 |  2258K |    32 M |       |  2554 (2) | 00:00:31 |     1.   338.

    |*  5 |    HASH JOIN |                     |  3906K |   175 M |   123 M | 12842 (2) | 00:02:35 |       |       |

    |   6.     FULL RESTRICTED INDEX SCAN FAST | PFA_FUSIONFACC_I01 |  3923K |    78 M |       |  5358 (2) | 00:01:05 |       |       |

    |   7.     FULL RESTRICTED INDEX SCAN FAST | PK_AUX_CTAFACTU |   147K |  1869K |       |  1120 (1) | 00:00:14 |       |       |

    -----------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - filter(ROWNUM<10000)

    2 - access("NPC".") COD_POSTAL "=" CTA ". "" COD_POSTAL "AND"NPC ". "" CTA_FACTURAC "=" CTA ". ("' CTA_FACTURAC")

    5 - access("CTA".") CTA_FACTURAC "=" WAS ". ("' CTA_FACTURAC")

    And statistics

    ----------------------------------------------------------

    1 recursive calls

    0 db block Gets

    54736 compatible Gets

    53070 physical readings

    0 redo size

    304491 bytes sent via SQL * Net to client

    7814 bytes received via SQL * Net from client

    668 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    9999 rows processed

    The "PFA_NPCOFACTMES_103" index is partitioned. I don't know if it's related to this issue:

    SQL > select table_name, uniqueness, separated from all_indexes where index-name = "PFA_NPCOFACTMES_103";

    TABLE_NAME UNIQUENES BY

    ------------------------------ --------- ---

    PFA_NPCOFACTMES NON-UNIQUE YES

    SQL > select TABLE_NAME, COLUMN_NAME, position_colonne from all_ind_columns where index-name = "PFA_NPCOFACTMES_103";

    TABLE_NAME COLUMN_NAME POSITION_COLONNE

    ------------------------------ ------------------------------ ---------------

    PFA_NPCOFACTMES CTA_FACTURAC 2

    PFA_NPCOFACTMES COD_POSTAL 1

    Why the update does not generate as much "becomes"?

    Thanks in advance,

    Jose Luis

    I don't know the reason why at first sight, but it is obvious that the inner nested loop was doing a lot of work (full index scan).

    My first thought was to rewrite the query in a merge statement.

    Perhaps leads to a more effective plan and so no need to delve deeper into the issues you have raised ;-)

    merge into FUS PFA_FUSIONFACC

    a_l'_aide_de)

    SELECT

    NPC. COD_FACTUcaRA AS COD_FACTURA

    NPC. TOT_BASEIMPO_E AS TOT_BASEIMPO

    NPC. TOT_IMPEMI AS TOT_IMPEMI

    OF NPC, CTA AUX_CTAFACTU PFA_NPCOFACTMES

    where

    NPC.cod_postal = CTA.cod_postal

    AND NPC.cta_facturac = CTA.cta_facturac

    ) cta

    (TBT. CTA_FACTURAC = WAS. CTA_FACTURAC)

    When matched then update

    Was SET. COD_FACTURA = cta. COD_FACTURA

    was. TOT_CARGO_DB = cta. TOT_BASEIMPO

    was. TOT_CARGO_FB) = cta. TOT_IMPEMI

    where ROWNUM<>

  • Is it possible to create a Local administrator user when you use the Profile Manager to get the configuration settings

    Hello

    We are studying the use of the Profile Manager of OS X as a way to manage our Enterprise macs.

    One of the demands made by the team, is to create an administrator user, as part of the OS X Profile which is lowered to the customer. The rationale is that this would be a way for the it team get, if the fubar user had their Mac

    I did not see this anywhere in the configuration options of the Profile Manager and so ask the people who use it as part of their everyday Toolbox, to find out if such an option is available.

    Thank you and best regards,

    Madan failed

    No, not with the Profile Manager.

    How you deploying your company Mac?  As institutionally imagery or as BYOD devices?  If image, then the image should contain a coherent local administrator account.  If the active image also the Apple Remote Desktop or SSH, you have a method of mass, control and manage the devices.  If BYOD style, then you are out of luck that the end user is the only one with the key of the device.

    You can take a look at following JAMF Casper.  Once devices are registered, you have the possibility to create accounts (However the common method is to create an account on registration).  If you deploy a BYOD approach, you should also look into DEP program Apple (https://deploy.apple.com) as more DEP JAMF (or other MDM) is a very powerful tool for light to zero touch deployment of systems.

    Reid

    Apple Consultants Network

    Author - "El Capitan Server - Foundation Services.

    Author - "El Capitan Server - Collaboration & control»

    Author - "El Capitan Server - Advanced Services '.

    : IBooks exclusively available in Apple store

  • Satellite A110-351: error: the game may not be coherent AGP is disabled

    I have Toshiba Satellite A110-351 and whenever I run some games im getting this error: ' the game may not be coherent AGP is off.»

    Please enable AGP for consistency. "No idea where in the Bios or drivers I can activate it?

    Hello

    Perhaps you have not enabled the acceleration of the PMA?
    Check this box:
    Start the DirectX with the dxdiag command in the immediate window and check all the available tabs.
    In one of this tab, you will find the options enable graphics acceleration ;)

  • HP PAVILION series P6000: could not get on the internet

    This lasts for 3-4 months. (have been using my laptop to the internet) Everytime I open internet, all I get is a page that says - can not display the page. When running the diagnostics, I get error 651, cannot detect networks, can not detect the proxy settings and a little more. I spent hours. on the phone with Comcast and they their test modem/router and anything else they could think and quite checks very well. In the Device Manager, all drivers are good to go. A Comcast tech thought there could be something in the computer that will be put into market (radio switch). I also tried to replace the ethernet cord, computer is wired. Frustrated, Mjs58

    Hello @mjs58,

    I understand that you are not able to connect to your wired network, and I'd love to help you!

    To re - establish a coherent link between your computer and the network, I recommend later in this document on the Troubleshooting Wired Home networks (Windows 7). This should help to run a diagnostic on your system using the network and Internet troubleshooting, as well as measures to maintain your system on the cable network.

    In addition, I suggest also follows the steps below to ensure that your power management settings do not interfere with your network connection:

    1. open DEVICE MANAGER
    2. open the NETWORK CARDS
    3. right click on the WiFi adapter for the pc and left click on PROPERTIES
    4. click on POWER up.
    5. remove the check mark beside : ALLOW the COMPUTER TO TURN THIS DEVICE SAVE START STOP
    6. click on OK
    7. close DEVICE MANAGER and test.

  • Problem setting up base appeal of the DLL (win32 API?) for the control of coherent laser Verdi-G

    I'm trying to set up a call to the DLL to control a coherent laser Verdi-G.

    I can't know the right way to set up calls. In the attached Demo.cpp, there is a function "RunTests". It's kinda my final goal. Functions send some commands to query the device. I'm going to need to send commands like this (along with several others, some of which take arguments... but I think I can understand that on mine)

    My problem is getting started. I can't even talk about the device. I tried a few different ways to set up the call to the DLL, but they have always will plant the computer. I don't know if I am missing a few parts such as the initialization of a method to speak via USB or other parts.

    I added my own .vi tries as well as some of the .c, the .cpp & the .h files associated provided with laser control software. I may have missed the relevant records; I'm happy to add them if someone sees a necessary file / referenced.

    Any help would be appreciated.

    Thanks for your time!

    Turns out I missed the included .vi which belongs to install them the package. I was looking directly on their CD.

    I would mark this closed if I saw a button for this?

Maybe you are looking for

  • Change the drive letter of the drive of CD on Portege M300

    I have a Portege M300, 40 GB, Windows XP.I have just repartioned my hard drive with Norton Partition Magic.The result is OK: I have now two drives, the two 20 GB. That one thing is not as I expected. Still, the DVD player, is recognized as D: and the

  • Installation of 3020CT Portege

    Hello.IM needing a bootdisk with support pcmcia...I tried everything and still can't make it work.Great I would like to run Windows ME, but that he would do with 98 SE...Someone who can help? To add is that I do not have the restore cd... Post edited

  • Satellite T110-121 - blue screen after the installation of recovery

    Hello everyone! My name is Melanie and I want to apologize for my English: I m french! I have big problems on my laptop, I will explain: I had to install windows yesteday and I used the partition recovery, all worked but the last seetings, my compute

  • Using Windows backup or Restore Wizard

    If I backed up the selected files (Documents and settings, programs and Windows operating system) on a secondary hard drive, why records are not visible on the disc, on which they have been saved? I see icons on the correct backup drive backup, but t

  • HP Lazerjet CM1312nfi: Scan from printer to computer

    When you try to scan I am rejected by message that a device has not been selected. I used the Setup Assistant and Director of HP but used tutorials don't tell me how to configure the computer as the device I want to scan to.