The cache/pin layout tables and indexes - Howto?

Hi all

I touched upon a request by a seller of BEDS to do something I'm not terribly familiar with... they want to "hide" or "pin" a table and an index in memory.

I was looking and saw something to the effect of making the Table1

ALTER TABLE Table1 in CACHE;

However, the seller has been mention some examples that seem to indicate the creation of a pool of Dungeon (a pool of buffers separate cache?).. and then doing something like

ALTER TABLE Table1 STORAGE (USER_TABLES KEEP)

Can someone give me an idea as to the difference between these two concepts... links on how do, etc.?

Thanks in advance!

Cayenne

Hello

There are 'rules' to pin the tables and indexes. The Oracle documentation states:

"A good candidate for a segment in the pool of the DUNGEON is a segment that is smaller than 10% of the size of the DEFAULT buffer pool and has suffered at least 1% of the total i/o in the system."

Here are the rules that I use:

-Cache tables & indexes where the table is low)<50 blocks)="" and="" the="" table="" experiences="" frequent="" full-table="">

-Cache objects that use more than 10% of the size of the data buffer.

Here is the script I use to automate the assignment of the tables in the pool of DUNGEON.

ATTENTION: This script is not for beginners:

http://www.rampant-books.com/t_oracle_keep_pool_assignment.htm

I hope this helps...

Donald K. Burleson
Oracle Press author
Author of "Oracle Tuning: the definitive reference".
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

Tags: Database

Similar Questions

  • New tables and indexes created do not appear in the view dba_segments

    Hi all

    I created 3 tables and indexes, but these items do not appear in dba_segments views. Is this a normal behavior? Previously, with dictionary managed tablespace, I can specify the least possible to create, at the table/index is created. But I don't know how works the locally managed tablespace. Please do advice. Thank you much in advance.

    I am using Oracle 11 g R2 (11.2.0.1.0) for Microsoft Windows (x 64), running on Windows 7.

    To reproduce this problem, I created the tablespaces as follows:

    CREATE TABLESPACE CUST_DATA
    DATAFILE ' d:\app\asus\oradata\orcl11gr2\CUST_DATA01. DBF' SIZE 512K
    AUTOEXTEND ON NEXT MAXSIZE 2000 K 256K
    MANAGEMENT UNIFORM LOCAL 256K SIZE MEASURE
    SEGMENT SPACE MANAGEMENT AUTO;

    CREATE TABLESPACE CUST_INDX
    DATAFILE ' d:\app\asus\oradata\orcl11gr2\CUST_INDX. DBF' SIZE 256K
    AUTOEXTEND ON NEXT MAXSIZE 2000 K 128K
    MANAGEMENT UNIFORM LOCAL 128K SIZE MEASURE
    SEGMENT SPACE MANAGEMENT AUTO;

    CREATE TABLE CUSTOMER_MASTER (CUST_ID VARCHAR2 (10))
    CUST_NAME VARCHAR2 (30),
    E-MAIL VARCHAR2 (30),
    DATE OF BIRTH,
    ADD_TYPE CHAR (2) CONSTRAINT CK_ADD_TYPE CHECK (ADD_TYPE ("B1", "B2", "H1", "H2")),
    CRE_USER VARCHAR2 (5) DEFAULT USER,.
    CRE_TIME TIMESTAMP (3) DEFAULT SYSTIMESTAMP.
    MOD_USER VARCHAR2 (5).
    MOD_TIME TIMESTAMP (3),
    CONSTRAINT PK_CUSTOMER_MASTER PRIMARY KEY (CUST_ID) USING INDEX TABLESPACE CUST_INDX)
    TABLESPACE CUST_DATA;

    SQL > SELECT TABLE_NAME, nom_tablespace
    USER_TABLES 2
    3 WHERE TABLE_NAME LIKE '% CUST. "

    TABLE_NAME, TABLESPACE_NAME
    ------------------------------ ------------------------------
    CUSTOMER_MASTER CUST_DATA

    SQL > SELECT INDEX_NAME, nom_tablespace
    2 FROM USER_INDEXES
    3 WHERE TABLE_NAME LIKE '% CUST. "

    INDEX_NAME TABLESPACE_NAME
    ------------------------------ ------------------------------
    PK_CUSTOMER_MASTER CUST_INDX


    SQL > SELECT nom_segment, SEGMENT_TYPE, nom_tablespace, BYTES
    2 FROM WHERE USER_SEGMENTS;

    no selected line

    An extension to what Sybrand said:

    There is a parameter called differed_segment_creation, who runs the behavior.

    If it is set to TRUE (the default), no segments will be allocated until you fill your table / index.

    Try to insert a row. You will see your table and index in dba_segments.

    See for more information

    http://docs.Oracle.com/CD/E14072_01/server.112/e10595/tables002.htm

  • partion tables and indexes

    Hi all

    DB: 10.2.0.4

    Is that we can convert a normal table into partitioned tables?
    If Yes, then what is the existing indexes on this table?

    IM totally new about partitioning (Table and Index). I read the oracle docs but still have confusion with local and global index (score and no-partion)...


    Please suggest...

    Kind regards.

    >
    Is that we can convert a normal table into partitioned tables?
    If Yes, then what is the existing indexes on this table?
    >
    You can use the EXCHANGE PARTITION to do. See this article from the Oracle base
    Partitioning of an existing Table using the EXCHANGE PARTITION
    http://www.Oracle-base.com/articles/Misc/partitioning-an-existing-table-using-Exchange-partition.php

    Or you can use for DBMS_REDEFINITION do directly

    See this article from the Oracle base
    http://www.Oracle-base.com/articles/Misc/partitioning-an-existing-table.php

    You can also create a new table and INSERT the data from the old table.

    The option you are using could depend on indexes how you have, if you intend to keep them all and if the indexes on the partitioned table must be either local or global.

    To refine the new partitioned table, you really need evaluate each index to determine that the index should be global or local, and if the index should also be partitioned.

    There isn't any point to create a new table with the same indexes if you want to redefine all the indexes. You would be better of the backup of the original and then table drop indexes before conversion.

    See the VLDB and partitioning Guide
    http://docs.Oracle.com/CD/B28359_01/server.111/b32024/TOC.htm

  • How FLASHBACK all TABLEs and indexes in a certain pattern for a restoration of p?

    Today I read a few web pages on how to use FLASHBACK to restore to a Restore Point.

    Unfortunately, all of these examples show just how to restore a single TABLE for example

    FLASHBACK TABLE t to RESTORE POINT before_we_do_anything;

    But how can I FLASHBACK all TABLEs (and indexes and other dependent objects) in a certain pattern to a one-step restore point)?

    FLASHBACK myschema.* to before_we_do_anything POINT of RESTORATION;

    does not work.

    Peter

    There is nothing like that. However, you could flashback the entire database to a point in time. It would of course have implications through patterns all the good.

    Nicolas.

  • After spending tables and index a different tablespace, index got unusable?

    Hello

    I moved to table and index a different tablespace. After the many indices obtained unusable. I did not understand thiis?

    How can I do still usable?

    best regards and thank you?

    If you bâtait the index (after moving the table, by the way), then they should be usable without something extra to see.
    Check this procedure only one (small) table and index if this index can be used later. If not, then you have a mystery :-)

    Kind regards
    Uwe Hesse

    http://uhesse.WordPress.com

  • How to collect statistics of Tables and index

    Hi all

    Please help me in the collection of statistics of Tables and index.

    Thank you

    for tables
    exec dbms_stats.gather_table_stats ("SCOTT", "EMPLOYEES");

    for indexes
    DBMS_STATS.gather_index_stats exec ('SCOTT', 'EMPLOYEES_PK');

    Visit this link for details
    http://nimishgarg.blogspot.com/2010/04/Oracle-dbmsstats-gather-statistics-of.html

  • I'm looking for Custom table and index

    Hi Hussein;
    I want to find tables and indexes in the APPS schema. All custom tables and index begins with ZZ...

    I try to type this query, but its bring many record a lot, where I am not mistaken. And can not find the query for custom index.

    Select a.table_name, a.owner, d.CREATED
    from all_tables an inner join dba_objects d on
    a.OWNER = d.OWNER
    where table_name like '% ZZ' and 'a.OWNER =' APPS

    Thanks for the tips

    Hello

    You do not have to join, ask just DBA_OBJECTS (where type_objet = 'TABLE' and object_name like '% ZZ') or (where object_type = 'TABLE' and OWNER = "CUSTOM SCHEMA"). If you follow the standards of customization, custom tables/index should exist under the custom schema (and not under APPS schema).

    Kind regards
    Hussein

  • Partitioned Tables and indexes

    Hello


    I have a question on the table and index partitioning. My scenario is:

    Charge 2 mio records in table T once a month. Loaded records are added to existing records, and once loaded data is never changed.
    At some point, I want to delete the older recordings, so I intend to this partition table.

    T table looks like:
    create table t (id       number(10) not null  constraint t_pk primary key,
                    period   number(10) not null,
                    contract number(10) not null,
                    attr     number(10) not null);
    
    create unique index t_ux1 on t(contract,period);
    
    create index t_ix2 on t(period);
    My plan is to partition T over the period, and I'm trying to read through the concepts
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14220/partconc.htm#g471747


    My question is now, how to manage the indexes, the t_pk, the t_ux1 and the t_ix2. Concepts of say,

    «1. If the table partitioning column is a subset of index keys, use a local index.»

    "2. If the index is unique, use a global index. If this is the case, you are finished. »


    So, that's how I read it
    -t_pk is unique, so this should be global
    -t_ux1 of columns is a subset, unless I have misunderstood (?), which should be local
    -index t_ix2 column is the same as the partitioning column, so it must be local

    Is this right, this t_ux1 should be a local partioned index, even if the period is the second column in the index?

    If true, what will happen when a partion fell?


    I am new in this area, so please feel the comment as you wish.


    Concerning
    Peter


    BANNER
    ----------------------------------------------------------------
    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - 64bi
    PL/SQL version 10.2.0.3.0 - Production
    CORE Production 10.2.0.3.0
    AMT for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - production
    NLSRTL Version 10.2.0.3.0 - Production

    Peter Gjelstrup wrote:

    My question is now, how to manage the indexes, the t_pk, the t_ux1 and the t_ix2. Concepts of say,

    «1. If the table partitioning column is a subset of index keys, use a local index.»

    "2. If the index is unique, use a global index. If this is the case, you are finished. »

    So, that's how I read it
    -t_pk is unique, so this should be global
    -t_ux1 of columns is a subset, unless I have misunderstood (?), which should be local
    -index t_ix2 column is the same as the partitioning column, so it must be local

    Is this right, this t_ux1 should be a local partioned index, even if the period is the second column in the index?

    A partitioned index locally can only be defined as unique if the partition key is part of the columns in the index. Imagine what the database would have to do if this is not the case: in order to verify if a newly added or updated value violates the uniqueness, it will have to travel all the partitions in a serialized operation - means that no one else could do the same thing at the same time. Since he is a killer of serious scalability in terms of locking and contention, this is not allowed.

    So: Your T_UX1 index can be defined as a unique index that is local because it contains the partition key. Although the index is not prefixed ("Prefix" means that it is divided by the left side of the columns in the index) which means that there may be access patterns where all partitions should be scanned or the optimizer cannot use a method of size of effective partition according to the way the index is reached.

    Your T_PK index cannot be set as local because it must be unique (you can not use a local non-unique index in this case), but does not contain your partition key. It must be a global index. An overall index can be partitioned as well (different from the underlying table) but it doesn't have to be.

    Depends on how you access your data you have not T_IX2 index when partitioning by this key because it corresponds to the partition key and therefore could not actually be used by the mechanism of partition pruning that limit your query to the scores of individuals.

    If you have more than one MAS environment where running queries are used longer, you should be fine with the index the in general (because they could be analyzed in parallel in parallel operations), but if you have an OLTP environment, then you should avoid local no prefix indexes due to the potential problem that you need to analyze all partitions.

    Be borne in mind that with partitioning adds an important layer of complexity to other areas: in particular the options available to the optimizer and analyze cost optimizer statistics. Depends on how you access your statistical data must be maintained on several levels now (level of score and at the global level, in the case of subpartitioning may be still at this level). If your data is important and you rely on "global" level statistics (these are always the case when the optimizer at the time analysis cannot limit access to a single partition) then in the pre - 11 g databases analyze these "global" level statistics can take a lot of time and resources, since actually , you need data several times (once for the partition and even global level).

    Presenting this partitioning may mean other potential problems in terms of execution that change (not for the better sometimes) plans and how to effectively collect statistics. Note that g 11 addresses the issue of 'statistics' by introducing the so-called "extra" global statistics. Greg Rahn wrote a [blog note | http://structureddata.org/2008/07/16/oracle-11g-incremental-global-statistics-on-partitioned-tables/] on this nice feature.

    >

    If true, what will happen when a partion fell?

    Since you're already on 10g, you can specify the database to update the scores of the local index using the UPDATE of the INDEX clause, while 9i could maintain only an overall index and it is up to you to rebuild the local index partitions after the partition DDL on the table (according to the DDL operation).

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

    Published by: Randolf Geist on Sep 30, 2008 16:39

    Added statistics / optimizer warning when you use the partitioning

  • What is the difference between a table and a subform?

    What is the difference between a table and a subform in LC forms? Please post your answers about the merits and demerits of using subforms instead of tables.

    Hello

    a table is simply a set of subforms with a particular role.

    It is easier to handle the tables if they must be dynamic (add or remove lines, show or hide lines when page breaks appear etc..).

    And Designers UI has some dialogue prepared in the object palette to simplify the settings of the tables.

    For subforms, dialog boxes are more frequent, so you have yourself a little more script.

    But at least you can do everything with subforms as you can do with tables.

    The only one who is not very good with tables we work when you wrap arrays in other tables.

  • Size of the data in a table and the size of the table

    I am trying to determine the size of the data in a table and also the overall table size. I use the following query:

    SELECT BOTTOM (a.owner) as owner,
    LOWER (a.table_name) AS table_name,
    a.tablespace_name,
    a.Num_Rows,
    ROUND ((a.blocks * 8 / 1024)) AS size_mb,
    a.Blocks,
    a.Blocks * 8 Blocks_Kilo_Byte.
    a.PCT_FREE,
    a.compression,
    a.Logging,
    b.bytes / 1024 / 1024
    From all_tables a, dba_segments b
    WHERE the a.owner AS SUPERIOR ("USER_TEST")
    AND a.table_name = "X_TEST_TABLE."
    AND b.segment_name = a.table_name
    AND b.owner = a.owner
    ORDER BY 1, 2;

    Is this the right way to go about finding the size of the data in a table? If this isn't the case, please give your suggestions.

    BTW, this in a 10g version.

    You probably want to use the DBMS_SPACE package. In particular, the procedures SPACE_USAGE and UNUSED_SPACE to get an accurate account of the use of space in a table. Your application may give you a relatively accurate estimate if the optimizer on your table's statistics are reasonably accurate estimates. But there is no guarantee that the optimizer statistics are accurate.

    If you want just an approximate answer and you're comfortable that your statistics are accurate, this query may be close enough. If you want a specific response, however, use the DBMS_SPACE package.

    Justin

  • Updates on the Cache, search, Mobile compatibility, and creation of Cluster for EM

    Hello

    I was wondering if anyone has made the implementation of Manager experience and could have the answers to the following questions:

    1. do we have any cache EM or if she can count on short cache for performance improvements?
    2. can you EM help sort for SEO?
    3. How can we ensure that the content of our site is rendered correctly in mobile devices also? Is - it, whenever I create a page template, I have to create another replica for mobile devices?
    4. any idea of design EM in cluster environment? -What will be a single instance on short ITL with converters of cartridge on each application server or will it be an equivalent number of EM instance of application servers?

    Any info on any of the topic would be really useful. Thanks in advance for this.

    Kind regards
    Vaibhav

    1. do we have any cache EM or if she can count on short cache for performance improvements?

    Nothing can ExpMgr cache. Moreover, these are not comparable. For performance in access time for data improvements, you can grant MDEX (assuming that is what you mean by short above), is hosted on performance related to front-end improvements you need to set the application front end and the application server.

    2. can you EM help sort for SEO?

    In the number short. But short can help, they have the SEO API was integrated into the API assembler which can take care of many aspects of SEO. Check it out [Module SEO | http://docs.oracle.com/cd/E35648_01/index.html] documentation.

    3. How can we ensure that the content of our site is rendered correctly in mobile devices also? Is - it, whenever I create a page template, I have to create another replica for mobile devices?

    Sort of. Either you use "Responsive Web Design" so that the same model works on different devices OR create separate templates for the different categories of devices...

    4. any idea of design EM in cluster environment? -What will be a single instance on short ITL with converters of cartridge on each application server or will it be an equivalent number of EM instance of application servers?

    You will have a WorkBench (Exp Manager), but your site will be deployed to each dgraph.

    HTH, get back if you need more details.
    Pankaj.

  • INI_TRANS for TABLE and INDEX

    Hello

    My version of DB is 10.2.0.3

    As default, the INI_TRANS of the tables is 1 and for the index is 2. For some reason I have to increase the INI_TRANS of a table at 5, then what value set for INI_TRANS of indexes on the table?

    I read somewhere that INI_TRANS of the index to be set twice from INI_TRANS. means of the table if table INI_TRANS is 5 then INI_TRANS of the index must be set to 10. Is this true? If Yes, then what is the logic behind this?



    Thank you
    Oratest

    Published by: oratest on February 4, 2013 15:26

    oratest wrote:

    My version of DB is 10.2.0.3

    As default, the INI_TRANS of the tables is 1 and for the index is 2. For some reason I have to increase the INI_TRANS of a table at 5, then what value set for INI_TRANS of indexes on the table?

    I read somewhere that INI_TRANS of the index to be set twice from INI_TRANS. means of the table if table INI_TRANS is 5 then INI_TRANS of the index must be set to 10. Is this true?

    N °
    There is no useful guidelines for a generic parameter. Consider the conflicting scenes:

    (a) five sessions insert five rows separated in a single table block - with 5 locations of ITL. There is an index on the table, but the five inserted rows just keep these different values that their index entries go to 5 different leaf blocks: the index didn't need initrans 5.

    (b) using the different sessions to insert a row in a table - the nature of the SAMS means that (on average) there are 5 rows of SAMS 80 inserted into 16 different blocks - the SAMS table must be 5. However, in this case the indexed column is generated by a sequence and all 80 index entries should be inserted in the same block of sheets, so you initrans 80 on the index. (Except Oracle will make sheets index block split to work around the problems of initrans was too small on the concurrent inserts.)

    You need to consider the nature of the index and model of changing data for each unique index separately - and then you could assign initrans on the index to do NO MORE THAN the initrans + 1 table because (a) who will lose not too much space (b) he is not likely to let the too great claim to happen (c) Oracle will extend dynamically LAUGHED in most cases (d) if it is bad for an index special you will notice it pretty quickly - and there will be other problems (buffer waits occupied) deal anyway on this index.

    Concerning
    Jonathan Lewis

  • How to align {tag_productquantity} in the shopping cart layout table?

    I inserted the {tag_productimage} tag in our shopping cart layout table. In accordance with the instructions in the following article http://kb.worldsecuresystems.com/654/bc_654.html? bc-partner I adjusted the height of .productitemcell in the Style sheet to be able to see the whole picture. However I have tried many elements of setting and nothing seems to align the {tag_productquantity} to sit in the iddle m of the cell as the rest of the information in the same row. Please see a screen shot here http://mychristmas.businesscatalyst.com/test This is a website, we are currently building http://mychristmas.businesscatalyst.com/

    Is someone can you please tell me what it is I have to settle for not having this field amount to sit at the top of the cell?

    Thanks in advance!

    Hello Erin,.

    Looks like if you give the .productitemcell a row height of 109px and then give 'input.cartInputText' high-margin of 44px all items in your shopping basket very well online.

    Hope this helps,

    Chad Smith | http://bcgurus.com/Business-Catalyst-Templates for only $7

  • Why the coldfusion costs number tables and dates from 1

    Why is coldfusion number tables and other structures of 1. Its pretty exasperating when the rest of the world for the most starts at 0?

    Zero base tables are a legacy from the time of the system who need to work on the address offset base memory table is stored to locate the starting address of each element.  So it makes a little sense that the first element is offset from the base address by a factor of zero.

    There are languages that predate C (where the C++ germinated some sort of horrible nightmare) that using 1 that the marketing of the index... it is just C has been reduced to minimize the translation of C code machine, and in this case 0 is more logical.  And other languages 'hug' just copied.  It is - in the modern era in which the source language is usually so far away from the machine language - illogical to persist with this kind of approach for one good reason other than to copy makes another language.

    On the human level, there is not a zero element in a collection, and because it is not really a treatment save one more just to start the table to a position more respectful man, why not?

    I mean... How confusing is really remember what language is that?

    --

    Adam

  • DBMS_STATS Table and Index Stats Question?

    All,

    Oracle database version: 10.2.0.3
    Operating system: Solaris 10 X 86-64

    We have a packed application we collect stats of objects with cascade = "TRUE". If the index statistics would be also collected in the process of collecting statistics. We do a estimate_percent = > 30 and method_opt = > all COLUMNS size AUTO no statistical calculation of these paintings that are huge (1 m lines - 192 m). The collected index statistics is based also on the estimate_percent product in the order.

    We found that some of the SQL had improved performance after the calculation of the index statistics in our Test environment that is a copy of production, updated daily.

    We thought the way to collect statistics:

    Collect statistics for tables with estimate_percent and Computing stats on index.

    We are making changes to our scripts and test approach in our Test environment.

    In the meantime, I would like to know the pros and cons of this approach?


    Thank you
    Anantha

    You run your own collect routine of stats, I understand that you disable an Oracle provides and plans automatically on 10g?

    What result did you get the Oracle supplied with AUTO_SAMPLE_SIZE routine?

    Estimate of the table and then calculating the index was something that I saw recommended in the past with ANALYZE and if you see the best results to the test, I think it would be worth in production.

    None of the environments applications two users are exactly the same, but the approach appears reasonable based on your observations.

    I suggest to bring together some before and after snapshots of query performance so that you have documentation of your results.

    IMHO - Mark D Powell-

Maybe you are looking for