PCT_DIRECT_ACCESS of secondary indexes of the IOT

Facing a performance problem to DELETE statement due to ignorance of a secondary index on ITO by the optimizer.

Version: 11.1.0.7.0

We did the "update block references" for secondary indexes, here's what we tested.
SQL> select owner,index_name,PCT_DIRECT_ACCESS  from dba_indexes where index_name in ('XYZ1');

OWNER                          INDEX_NAME                     PCT_DIRECT_ACCESS
------------------------------ ------------------------------ -----------------
DLF5                           XYZ1                                          91
DLF7                           XYZ1                                          87
DLF4                           XYZ1                                          90
DLF0                           XYZ1                                          92
DLF3                           XYZ1                                          85
DLF1                           XYZ1                                          97
DLF6                           XYZ1                                          93
DLF2                           XYZ1                                          91

SQL> delete FROM DLF0.LOCATE D WHERE GUID = 'Iwfegjie2jgigqwwuenbqw' AND C_ID = 30918 AND ((S_ID < 8672) OR (S_ID <= 8672 AND DELETE_FLAG = 'Y'));

0 rows deleted.

SQL> select PLAN_TABLE_OUTPUT  from table(dbms_xplan.display_cursor(null,null,'RUNSTATS_LAST'));

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------
SQL_ID  7qxyur0npcpvh, child number 0
-------------------------------------
delete FROM DLF0.LOCATE D WHERE GUID = :"SYS_B_0" AND C_ID
= :"SYS_B_1" AND ((S_ID < :"SYS_B_2") OR (S_ID <= :"SYS_B_3"
AND DELETE_FLAG = :"SYS_B_4"))

Plan hash value: 310264634

-------------------------------------------------------------------------------------------
| Id  | Operation          | Name       | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
-------------------------------------------------------------------------------------------
|   0 | DELETE STATEMENT   |            |      1 |        |      0 |00:00:00.01 |    1260 |
|   1 |  DELETE            | LOCATE     |      1 |        |      0 |00:00:00.01 |    1260 |
|   2 |   CONCATENATION    |            |      1 |        |      0 |00:00:00.01 |    1260 |
|*  3 |    INDEX RANGE SCAN| DLF0PK     |      1 |      1 |      0 |00:00:00.01 |     630 |
|*  4 |    INDEX RANGE SCAN| DLF0PK     |      1 |      1 |      0 |00:00:00.01 |     630 |
-------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   3 - access("C_ID"=:SYS_B_1 AND "GUID"=:SYS_B_0 AND
              "DELETE_FLAG"=:SYS_B_4 AND "S_ID"<=:SYS_B_3)
       filter(("GUID"=:SYS_B_0 AND "DELETE_FLAG"=:SYS_B_4))
   4 - access("C_ID"=:SYS_B_1 AND "GUID"=:SYS_B_0 AND "S_ID"<:SYS_B_2)
       filter(("GUID"=:SYS_B_0 AND (LNNVL("S_ID"<=:SYS_B_3) OR
              LNNVL("DELETE_FLAG"=:SYS_B_4))))


28 rows selected.

SQL> rollback;

Rollback complete.
At this point, we have updated the block reference and gathered stats.
SQL> select owner,index_name,PCT_DIRECT_ACCESS  from dba_indexes where index_name in ('XYZ1');

OWNER                          INDEX_NAME                     PCT_DIRECT_ACCESS
------------------------------ ------------------------------ -----------------
DLF0                           XYZ1                                         100
DLF1                           XYZ1                                         100
DLF2                           XYZ1                                         100
DLF3                           XYZ1                                         100
DLF4                           XYZ1                                         100
DLF5                           XYZ1                                         100
DLF6                           XYZ1                                         100
DLF7                           XYZ1                                         100

8 rows selected.

SQL> delete  FROM DLF0.LOCATE D WHERE GUID = 'Iwfegjie2jgigqwwuenbqw' AND C_ID = 30918 AND ((S_ID < 8672) OR (S_ID <= 8672 AND DELETE_FLAG = 'Y'));

0 rows deleted.

Elapsed: 00:00:00.03
SQL> select PLAN_TABLE_OUTPUT  from table(dbms_xplan.display_cursor(null,null,'RUNSTATS_LAST'));

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------
SQL_ID  fmrp501t70s66, child number 0
-------------------------------------
delete  FROM DLF0.LOCATE D WHERE GUID = :"SYS_B_0" AND
C_ID = :"SYS_B_1" AND ((S_ID < :"SYS_B_2") OR (S_ID <=
:"SYS_B_3" AND DELETE_FLAG = :"SYS_B_4"))

Plan hash value: 310264634

-------------------------------------------------------------------------------------------
| Id  | Operation          | Name       | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
-------------------------------------------------------------------------------------------
|   0 | DELETE STATEMENT   |            |      1 |        |      0 |00:00:00.02 |    1260 |
|   1 |  DELETE            | LOCATE     |      1 |        |      0 |00:00:00.02 |    1260 |
|   2 |   CONCATENATION    |            |      1 |        |      0 |00:00:00.02 |    1260 |
|*  3 |    INDEX RANGE SCAN| DLF0PK     |      1 |      1 |      0 |00:00:00.01 |     630 |
|*  4 |    INDEX RANGE SCAN| DLF0PK     |      1 |      1 |      0 |00:00:00.02 |     630 |
-------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   3 - access("C_ID"=:SYS_B_1 AND "GUID"=:SYS_B_0 AND
              "DELETE_FLAG"=:SYS_B_4 AND "S_ID"<=:SYS_B_3)
       filter(("GUID"=:SYS_B_0 AND "DELETE_FLAG"=:SYS_B_4))
   4 - access("C_ID"=:SYS_B_1 AND "GUID"=:SYS_B_0 AND "S_ID"<:SYS_B_2)
       filter(("GUID"=:SYS_B_0 AND (LNNVL("S_ID"<=:SYS_B_3) OR
              LNNVL("DELETE_FLAG"=:SYS_B_4))))


28 rows selected.

Elapsed: 00:00:00.01
SQL> rollback;

Rollback complete.

Elapsed: 00:00:00.00
So it made no difference.
With the help of suspicion is much better.
SQL> delete /*+ index(D XYZ1) */  FROM DLF0.LOCATE D WHERE GUID = 'Iwfegjie2jgigqwwuenbqw' AND C_ID = 30918 AND ((S_ID < 8672) OR (S_ID <= 8672 AND DELETE_FLAG = 'Y'));

0 rows deleted.

Elapsed: 00:00:00.00
SQL> select PLAN_TABLE_OUTPUT  from table(dbms_xplan.display_cursor(null,null,'RUNSTATS_LAST'));

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------
SQL_ID  0cf13mwxuksht, child number 0
-------------------------------------
delete /*+ index(D XYZ1) */  FROM DLF0.LOCATE D WHERE GUID =
:"SYS_B_0" AND C_ID = :"SYS_B_1" AND ((S_ID < :"SYS_B_2")
OR (S_ID <= :"SYS_B_3" AND DELETE_FLAG = :"SYS_B_4"))

Plan hash value: 2359760181

------------------------------------------------------------------------------------------
| Id  | Operation         | Name       | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
------------------------------------------------------------------------------------------
|   0 | DELETE STATEMENT  |            |      1 |        |      0 |00:00:00.01 |       3 |
|   1 |  DELETE           | LOCATE     |      1 |        |      0 |00:00:00.01 |       3 |
|*  2 |   INDEX RANGE SCAN| XYZ1       |      1 |      1 |      0 |00:00:00.01 |       3 |
------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access("GUID"=:SYS_B_0)
       filter(("C_ID"=:SYS_B_1 AND ("S_ID"<:SYS_B_2 OR
              ("S_ID"<=:SYS_B_3 AND "DELETE_FLAG"=:SYS_B_4))))


23 rows selected.

Elapsed: 00:00:00.01

SQL> rollback;

Rollback complete.
Could someone please help us to get the cause for the ignorance of a secondary by the optimizer index when secondary Index is to have 100% PCT_DIRECT_ACCESS.

It seems to be processing problem with predicate of GOLD... but could not connect as I don't know many with ITO.

-Yasser

Published by: Yasu on 23 April 2012 16:39

Its no different then any other optimizer choice, why did - it go one way rather than the other, its because he thought that less expensive.

If you really want to prove, suggest a with and without suspicion 10053 trace, read both and see the costing. the wonderful Mr. lewis has a note on this thing with the GSIS ignored with IOT, it seems that the work is already done for you

http://jonathanlewis.WordPress.com/2008/02/25/iots-and-10053/

Tags: Database

Similar Questions

  • Difference between the foreign key index and secondary index

    Hello

    Suppose we have two primary databases,

    Employee (id, company_id)

    Company (id, name)

    (where: the employee of the company is one to many, and I use the collections API)

    If we want to perform a join between the employee and the company based on the ID of the company. I want to know the difference between the following two options:

    1 - construction of a secondary index on the Employee (company_id). call this index index1. Then, we use the following code:

    For each company c
    index1.get (c.ID)

    2 - construction of a foreign key on Employee (company_id) index where the database of foreign key was undertaken. call this index index2. Then, we use the following code:

    For each company c
    index2.get (c.ID)

    I have two questions:

    1 - What is the difference between these two options in terms of performance?

    2. I know that one of the benefits of the foreign key are the application of integrity constraints (CASCADE, CANCEL, etc. to DELETE). That declare a foreign key to give me any advantage when I want to do a join? (for example a quick method, or a single statement to a join)

    Thank you
    Wait.

    It doesn't matter what the example, the only advantage of a foreign key index (above, the benefits of a secondary index) is that it imposes of foreign key constraints. There is no other advantage to a foreign key index.

    -mark

  • One of the secondary index is not complete

    Hello

    I had an entity having 18847 record.  It contains a primary key and secondary keys several.  Since the next release to check, we see it, all indexes are complete except ProductId.  What should I do to fix this error?

    Verification of data persist #gdlogs #test. TableWhProductStorageCard

    Tree control to persist #gdlogs #test. TableWhProductStorageCard

    BTree: Composition of the btree, types and number of nodes.

    binCount = 149

    binEntriesHistogram = [40-49%: 1; 80 to 89%: 1, 90-99%: 147]

    binsByLevel = [level 1: count = 149]

    deletedLNCount = 0

    inCount = 3

    insByLevel = [level 2: number = 2; level 3: count = 1]

    lnCount = 18, 847

    mainTreeMaxDepth = 3

    BTree: Composition of the btree, types and number of nodes.

    Verification of data persist #gdlogs #test. TableWhProductStorageCard #BatchNo

    Tree control to persist #gdlogs #test. TableWhProductStorageCard #BatchNo

    BTree: Composition of the btree, types and number of nodes.

    binCount = 243

    binEntriesHistogram = [% 40-49: 43; 50 to 59%: 121, 60-69%: 30; 70-79%: 23; 80 to 89%: 17; 90-99%: 9]

    binsByLevel = [level 1: count = 243]

    deletedLNCount = 0

    inCount = 4

    insByLevel = [level 2: number = 3; level 3: count = 1]

    lnCount = 18, 847

    mainTreeMaxDepth = 3

    BTree: Composition of the btree, types and number of nodes.

    This secondary index is correct. (the lnCount is the same as the primary index)


    Verification of data persist #gdlogs #test. TableWhProductStorageCard #ProductId

    Tree control to persist #gdlogs #test. TableWhProductStorageCard #ProductId

    BTree: Composition of the btree, types and number of nodes.

    binCount = 168

    binEntriesHistogram = [% 40-49: 16; 50 to 59%: 47; 60 to 69%: 39; 70-79%: 26; 80 to 89%: 26; 90-99%: 14]

    binsByLevel = [level 1: count = 168]

    deletedLNCount = 0

    inCount = 3

    insByLevel = [level 2: number = 2; level 3: count = 1]

    lnCount = 14: 731

    mainTreeMaxDepth = 3

    BTree: Composition of the btree, types and number of nodes.

    This index is not complete. (lnCount is less than the primary index)  Then when use this index to iterate through the lines, only the first record 14731 is returned.


    Apparently, somehow your secondary index DB became not synchronized with your primary.  Normally, this is caused by not using is not a transactional store (EntityStore.setTransactional).  But whatever the cause, I will describe how to correct the situation by rebuilding the index.

    (1) take your application offline so that no other operations occur.

    (2) make a backup in case a problem occurs during this procedure.

    (3) do not open the EntityStore yet.

    (4) delete the database index that is out of sync (persist #gdlogs #test. TableWhProductStorageCard #ProductId) by calling the Environment.removeDatabase with this name.

    (5) rebuild the index database simply by opening the EntityStore.  It will take more time than usual, since the index will be rebuilt before the return of the EntityStore constructor.

    (6) confirm that the index is rebuilt correctly.

    (7) bring your online return request.

    -mark

  • Question about the use of secondary indexes in application

    Hi, I'm a newbie to Berkeley DB. We use Berkeley DB for our application that has tables in the following structure.

    Key to value1 value2
    ------- --------- ----------
    1) E_ID-> E_Attr, A_ID - where A_ID is String for example. A_ID = A1; A2; A3
    -where E_ID is unique but for example A1 or A2 may be part of multiple F_VITA say E1, E3, E5 etc.


    So my question is that it is possible to create secondary indexes on individual items of Value2 (e.g., A1, A2 or A3)?


    Another question, lets say we have two tables

    Key to value1 value2
    ------- --------- ----------
    2) X_ID-> X_Attr, E_ID

    E_ID-> E_Attr, A_ID - where A_ID is String for example. A_ID = A1; A2; A3

    In this case, can create us E_ID as a secondary Index but with primary Table-> E_Attr, A_ID E_ID?

    While X_ID given, we can get the chronogram, E_ID-> E_Attr, table allocation A_ID?

    Don't know if its possible.

    Thanks for reading.

    (1) when talking about data & Index, I was referring to READ ONLY BDB with no. UPDATES where you download entire files allows for example on a weekly basis. In this case, I believe that the data will be stored directly in the tree. It will not be stored in the transaction as such logs. This hypothesis is correct?

    # Storage I is nothing other than a transaction log. Read the white paper, that I mentioned.

    (2) and about the Garbage Collection operation, I meant BDB 'Cache éviction' algorithms. Sorry I have not communicated before.

    I use an LRU algorithm. What do you need exactly to know, that you can not get the doc?

    -mark

  • Add a secondary index to store existing data (json).

    I want to store json using BDB messages. We use the json as a key object property and the rest of the object (bytes) json as a data. later if we want to add secondary index targeting property of the json for the existing data store object, I can not do that because the data is to stay as a bytes.is their all recommend how do this .i am very new to BDB.

    In BDB, the land used for a secondary index is from primary registration data (byte []) by using the code that you write.  You can convert bytes of data from the primary registration in JSON, pull on the property you want, and then convert this byte property (since all the keys of the BDB are bytes more).

    See:

    SecondaryKeyCreator (Oracle - Berkeley DB Java Edition API)

    And to make it easy convert the property in bytes:

    com Sleepycat.bind.Tuple (Oracle - Java Edition Berkeley DB API)

    The collections API tutorial is good to learn how it works, even if you do not use the collections API:

    Berkeley DB Java Edition Collections tutorial

    -mark

  • Question on UniqueConstraintException and secondary indexes.

    Hello

    We use the BDB DPL package for loading and reading data.

    We have created ONE_TO_MANY secondary Index on for example ID-> Account_NOs

    During the loading of data, using for example. primaryIndex.put(id,account_nos); -UniqueConstraintException is thrown when there are duplicate account numbers existing id

    But although UniqueConstraintException is thrown, the secondary key duplicate data are still load in BDB. I think that the data should not get charged if an Exception is thrown. Can I know if I am missing something here?

    for example.

    ID = 101-> accounts = 12345, 34567 - loading successfully of the key = 101
    ID = 201-> accounts = 77788, 12345 - throw an Exception but data is still to take key = 201.

    Your store is transactional? If this isn't the case, it is what explains and I suggest you do your transactional shop. A non-transactional store with secondary clues ask trouble, and you are responsible for the manual correction of errors of integrity if the primary and the secondary to be out of sync.

    See 'Special Considerations for the use of secondary databases with or without Transactions' here:
    http://download.Oracle.com/docs/CD/E17277_02/HTML/Java/COM/Sleepycat/je/SecondaryDatabase.html

    -mark

  • Partial insertion with secondary index

    I would like to use partial inserts (DB_DBT_PARTIAL).
    However, I also need secondary indexes. Now when I insert partial data, the secondary index function is called immediately, but again, I don't have enough data to calculate the secondary key. I tried to provide some app_data is the DBT, but it does not reach the secondary index function.
    Is it possible that I can use partial inserts as well as secondary indexes?

    Hello

    Your secondary index callback function detects when there is not enough data to generate the secondary key? If so, you can return your callback function DB_DONOTINDEX.

    For more information about DB_DONOTINDEX, see the db-> documentation here: http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/dbassociate.html

    DB_DONOTINDEX basically tells the library is not to create a secondary key for this record. Subsequent updates to the data structure (that do contain the data that you need) can then return the value of secondary key appropriate to the callback function.

    Kind regards

    Dave

  • Index of the question - do not include the cost

    Hello

    I have a table of 112mil lines that I copied to a new tablespace, which worked well
    I am so adding indexes to the copied table, but gets enormous costs in plans by trying to make a request using the new index, similar to quirying the original table/index

    First of all I tired to change my main index to an another initial tablespace more great extension, and even if I remove all cela and put it in the table space as well as the original index and created the same way, I get the same huge difference.

    In most om my system this will cause queries that the CBO does not use the index, and applications get very slow. If I do a simple select statement, and the index is selected, even if the cost is enormous, the moment of the actual query is the same as the original table/query. I can't get the cost of the change index by trying different dbms_stats.gather_index_stats settings

    Can someone tell me why this new index comes up with such a huge cost, and what I can do to lower the cost, so that the index gets actually chosen?

    Here is some basic information:

    It's about Oracle 10 g 2 (10.2.0.4) EA

    The simplified create statement for the original and the new index:

    CREATE INDEX IDX_POS_DATE ON FMC_POS
    ("UTC_DATE' DESC, FMC_LOGVES_ID)

    CREATE the INDEX IDX_POS_DATE_P2 on FMC_POS_p2
    ("UTC_DATE' DESC, FMC_LOGVES_ID)

    The two indices in dba_indexes:

    Source language:
    OWNER: VTRACK
    INDEX_NAME: IDX_POS_DATE
    INDEX_TYPE: BASED ON A NORMAL FUNCTION
    TABLE_OWNER: VTRACK
    TABLE_NAME: FMC_POS
    TABLE_TYPE: TABLE
    UNIQUENESS: NO SINGLE
    COMPRESSION: DISABLED
    PREFIX_LENGTH:
    NOM_TABLESPACE: USERS
    INI_TRANS: 2
    MAX_TRANS: 255
    INITIAL_EXTENT: 65536
    NEXT_EXTENT:
    MIN_EXTENTS: 1
    MAX_EXTENTS: 2147483645
    PCT_INCREASE:
    PCT_THRESHOLD:
    INCLUDE_COLUMN:
    FREELISTS:
    FREELIST_GROUPS:
    PCT_FREE: 10
    LOGGING: YES
    BLEVEL: 3
    LEAF_BLOCKS: 439239
    DISTINCT_KEYS: 108849202
    AVG_LEAF_BLOCKS_PER_KEY: 1
    AVG_DATA_BLOCKS_PER_KEY: 1
    CLUSTERING_FACTOR: 79021005
    STATUS: VALID
    NUM_ROWS: 110950137
    SAMPLE_SIZE: 2177632
    LAST_ANALYZED: 05/09/2011 23:38:15
    DEGREE: 1
    INSTANCES: 1
    PARTITIONED: NO.
    TEMPORARY: N
    GENERATED: N
    SCHOOL: N
    USER_TABLES: DEFAULT
    USER_STATS: NO.
    DURATION:
    PCT_DIRECT_ACCESS:
    ITYP_OWNER:
    ITYP_NAME:
    PARAMETERS:
    GLOBAL_STATS: YES
    DOMIDX_STATUS:
    DOMIDX_OPSTATUS:
    FUNCIDX_STATUS: ENABLED
    JOIN_INDEX: NO.
    IOT_REDUNDANT_PKEY_ELIM: NO.
    ELIMINATED: NO.

    New:
    OWNER: VTRACK
    INDEX_NAME: IDX_POS_DATE_P2
    INDEX_TYPE: BASED ON A NORMAL FUNCTION
    TABLE_OWNER: VTRACK
    TABLE_NAME: FMC_POS_P2
    TABLE_TYPE: TABLE
    UNIQUENESS: NO SINGLE
    COMPRESSION: DISABLED
    PREFIX_LENGTH:
    NOM_TABLESPACE: USERS
    INI_TRANS: 2
    MAX_TRANS: 255
    INITIAL_EXTENT: 65536
    NEXT_EXTENT:
    MIN_EXTENTS: 1
    MAX_EXTENTS: 2147483645
    PCT_INCREASE:
    PCT_THRESHOLD:
    INCLUDE_COLUMN:
    FREELISTS:
    FREELIST_GROUPS:
    PCT_FREE: 10
    LOGGING: YES
    BLEVEL: 3
    LEAF_BLOCKS: 408128
    DISTINCT_KEYS: 111888565
    AVG_LEAF_BLOCKS_PER_KEY: 1
    AVG_DATA_BLOCKS_PER_KEY: 1
    CLUSTERING_FACTOR: 88607794
    STATUS: VALID
    NUM_ROWS: 112757727
    SAMPLE_SIZE: 112757727
    LAST_ANALYZED: 23/06/2011 07:57:14
    DEGREE: 1
    INSTANCES: 1
    PARTITIONED: NO.
    TEMPORARY: N
    GENERATED: N
    SCHOOL: N
    USER_TABLES: DEFAULT
    USER_STATS: NO.
    DURATION:
    PCT_DIRECT_ACCESS:
    ITYP_OWNER:
    ITYP_NAME:
    PARAMETERS:
    GLOBAL_STATS: NO.
    DOMIDX_STATUS:
    DOMIDX_OPSTATUS:
    FUNCIDX_STATUS: ENABLED
    JOIN_INDEX: NO.
    IOT_REDUNDANT_PKEY_ELIM: NO.
    ELIMINATED: NO.

    The simple selects and costs:

    Original table / index:

    Select * from fmc_pos where utc_date > sysdate-10
    Plan:
    ALL_ROWS SELECT STATEMENT
    Cost: 5 bytes: 5,350 cardinality: 50
    TABLE ACCESS BY INDEX ROWID VTRACK TABLE 2. FMC_POS
    Cost: 5 bytes: 5,350 cardinality: 50
    1 INDEX RANGE SCAN INDEX VTRACK. IDX_POS_DATE
    Cost: cardinality 4: 1

    Original table / index:

    Select * from fmc_pos_p2 where utc_date > sysdate-10
    Plan:
    Plan
    ALL_ROWS SELECT STATEMENT
    Cost: 3,067 bytes: 2.708.856 cardinality: 25.082
    TABLE ACCESS BY INDEX ROWID VTRACK TABLE 2. FMC_POS_P2
    Cost: 3,067 bytes: 2.708.856 cardinality: 25.082
    1 INDEX RANGE SCAN INDEX VTRACK. IDX_POS_DATE_P2
    Cost: cardinality 2.927: 177

    >

    Original table/index:
    
    select * from fmc_pos where utc_date>sysdate-10
    Plan:
    SELECT STATEMENT  ALL_ROWS
    Cost: 5  Bytes: 5.350  Cardinality: 50
    2 TABLE ACCESS BY INDEX ROWID TABLE VTRACK.FMC_POS
    Cost: 5  Bytes: 5.350  Cardinality: 50
    1 INDEX RANGE SCAN INDEX VTRACK.IDX_POS_DATE
    Cost: 4  Cardinality: 1  
    
    Original table/index:
    
    select * from fmc_pos_p2 where utc_date>sysdate-10
    Plan:
    Plan
    SELECT STATEMENT  ALL_ROWS
    Cost: 3.067  Bytes: 2.708.856  Cardinality: 25.082
    2 TABLE ACCESS BY INDEX ROWID TABLE VTRACK.FMC_POS_P2
    Cost: 3.067  Bytes: 2.708.856  Cardinality: 25.082
    1 INDEX RANGE SCAN INDEX VTRACK.IDX_POS_DATE_P2
    Cost: 2.927  Cardinality: 177
    

    Look at the stats of the table, not the index statistics. Cardinalities are extremely different.
    Specifically, what are the high and low values on the utc_date column.
    (The old table statistics are probably days or weeks, obsolete).

    Concerning
    Jonathan Lewis

  • Secondary databases in the Berkeley DB

    Please, can you help me with the following situations?



    I loaded about 18,500,000 records into a single primary database and approximately 12 500 000 records in another. It took about 6 hours to load the data and write data files: is this normal?


    Now, I need to define the secondary databases during these two primary databases: what I have to load all the data again or I can build the secondary databases on the loaded data?

    Thanks in advance for your answers!

    Hello

    >

    I loaded about 18,500,000 records into a single primary database and approximately 12 500 000 records in another. It took about 6 hours to load the data and write data files: is this normal?

    It may be normal. If you do not need guarantees of sustainability during the loading phase, you can try to load the data without the use of transactions (and logging); Thus, you avoid the necessary I/o to write the records of the newspaper in the logs files and the slight overhead of initialization and complete transactions. In addition, you can benefit from bulk write data: bulk updates
    At the end of the loading phase, you will need to stop and close environment, make sure that the databases are compatible via db_verify running and make a backup for them. When you restart the environment for regular use (non-charge ops) you will initialize the logging subsystems and transactional (DB_INIT_LOG, DB_INIT_TXN).
    Also, you can improve the performance of writing in pre-sorting of data before loading (according to the order of the function of the key comparison that you defined for the database, or lexicographical order if you have not defined a - applies to Btree and hash access methods).
    Additional pointers on how to deal with the load, in both cases, when you make this transactional mode or not, can be extracted from here:
    Writing to the database records
    The Page size setting
    Selection of the size of Cache
    Tuning to access method
    Setting of the transaction

    Now, I need to define the secondary databases during these two primary databases: what I have to load all the data again or I can build the secondary databases on the loaded data?

    You can create secondary from scratch, without the need to load the data all over again. See the DB_CREATE flag for the Db::associate() method.
    Note that in a transactional environment, the creation of the secondary index is executed in a single transaction. It is therefore likely that you might meet ENOMEM as errors. In this case try opening the environment without initializing the transaction subsystem (DB_INIT_TXN), wait for the creation of secondary to fill, data bases close environment, as well as restarting it with on transaction.

    Kind regards
    Andrei

  • putNoOverwrite taints a secondary index

    Context: BDB v4.7.25, DPL via the Java API, enabled replication subsystem (so with the transactions, logging, etc..)

    I encounter strange behavior, using putNoOverwrite on an existing entity with secondary keys.
    One of the two secondary indexes declared in the entity gets broken.

    Let me explain with an example case.

    The entity:
    @Entity (version = 0)
    public class SomeEntity
    {
    @PrimaryKey
    private int pk;

    @SecondaryKey (= Relationship.MANY_TO_ONE, relatedEntity = AnotherEntity.class, onRelatedEntityDelete = DeleteAction.ABORT Chronicles)
    private int fk;

    @SecondaryKey (relate = Relationship.MANY_TO_ONE)
    deprived of the String status = "UNKNOWN";
    }

    The first put or putNoOverwrite is perfect:
    putNoOverwrite (pk = 1, fk = 10, State = "OK")

    My entity is not in DB, can I get it back through the secondary database 'State' with the value 'OK' (method SecondaryIndex.subIndex).

    Then the defective putNoOverwrite:
    putNoOverwrite (pk = 1, fk = 10, State = "UNKNOWN")

    This call should have no effect. In turn, my entity is still present in DB and when I recover via is PK, I get it intact.
    But when I retrieve via the secondary index 'State' with the value 'OK' (method SecondaryIndex.subIndex), there is no match. The only present secondary key in the secondary index is 'UNKNOWN '.

    I encounter this problem repeatedly.
    Thanks for your help

    Hello. This bug has been fixed in the latest version of BDB (4.8.24.) The change log entry is 1 in general changes of access method:
    http://www.Oracle.com/technology/documentation/Berkeley-DB/DB/programmer_reference/changelog_4_8.html

    You will need to upgrade the BDB to solve this problem, because the fix has not been backported to version 4.7.

    Ben Schmeckpeper

  • Index of the markers of the Viewer?

    In the index of the timeline, you can see the list of markers in the timeline. Is it similar to put in markers Viewer?

    mnstudio wrote:

    In the index of the timeline, you can see the list of markers in the timeline. Is it similar to put in markers Viewer?

    Well, sort of... you can set your browser to display the list and twirl the little open triangles.

    You will see all kinds of things, such as Favorites, keywords, etc..

    There is no way I know of to make sure that you only see the markers.

  • Can I set up a secondary monitor to the HD on my iMac mid 2011

    Can I set up a secondary monitor to the HD on my iMac mid-2011 with no problems. I cannot afford to upgrade to the new iMac 27-inch and wanted to update my monitor.

    Is this possible on the Mid 2011 iMac?

    Yes.

    Your best option is to choose a good monitor that has Display Port or DVI input and shy away from those who only have HDMI and VGA input.

    For a display Port monitor you will need a Mini Display Port to Display Port cable if it is not provided with the monitor.

    For a DVI monitor you will need to a Mini DisplayPort to DVI adapter and a DVI cable.

  • My website looks fine in other browsers, but on firefox it arrives as an index with the title first and on the second line it says go to the content. This can be corrected?

    When I look at my site it loads as an index with the heading on the top line and then a link saying "go to content" and then corresponds to the navigation in the chips. I downloaded the latest version of firefox and this did not improve the situation. The site looks very well in other browsers.

    Make sure that you do not block the CSS files on this page.

    Reload Web pages, and ignore the cache.

    • Hold SHIFT and click reload.
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Cmd + Shift + R' (MAC)

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • display the index in the notes not available

    display the index in the notes not available

    explain

  • sorting table, how to get the new index of the last value?

    Hi all!

    I use a Subvi, which adds a cluter of the parameters to an array and then sort this table by one of the parameters in clusters.

    It works very well, with examples, that I found in this forum

    but now, I would like to know if it is possible to obtain at the end of the new cluster index first added.

    See attached VI

    Thank you

    You take the size of the table and insert the new element to this level is anything other than the table of construction and a simple construction would do that.

    In your question, I assume you're asking on the index of the item that you inserted after the sorting of the table, right? In this case, you can compare the cluster element that you introduce to the initial with the cluster table you get after a sorting of the table. This will give you the index of the item that you insert at the start.

Maybe you are looking for

  • Problem with IMovie and Quick time

    Hey everybody, I am faced with an unexpected problem with Quicktime and I Movie, and I was wondering if someone had already known that: I want to create a film based on shots from my personal camera. I started to work with IMovie to create a sequence

  • My fate of the auto is automatically disengaged when I clear my history. How can I reinstall it.

    When I cleared my story the last time that the function that insertsfilled emails etc when I start typing in a disconnected and I can not restart. I tried to reinstall Firefox, hoping that would solve the problem. I use AT & T Messaging.How to get th

  • Want help to choose ram.

    Hello I'm working on (very) slowly upgrading to an old HP desktop to a gaming PC, I have almost everything except the CPU, motherboard and Ram scrapped. I have it transplanted into the NZXT S340, and it has been working fine since. When playing games

  • El Capitan and Time Machine

    First my setup. I am El Capitan running on my Mac Mini. My House is hard wired Cat 6 for a central switch. I have a 1st gen Time Capsule to the location of the switch to connect the Ethernet switch and he also manages the wi - fi for my wireless devi

  • Fax window

    HP OfficeJet 6500 E710n-z Windows XP After installation, every time I ask an impression of the home desktop computer on which the software has been loaded, the send fax window appears. No printing occurs. Printing works fine from my windows laptop an