Identifying candidates for KEEP pool

Hi,
recently a DBA I know was asked to make a list of candidates for KEEP pool in buffer cache. He's not familiar with the application. Is there an automated way to do this, or is this something that only someone familiar with the business logic can do manually?
I googled a bit on the subject, but haven't found much except for Mr. Burleson's scripts (who has a history of giving idiotic advice so I don't trust him) or rather general theoretical discussions (like the thread on AskTom). I'm interested in someone who has done it (or learned why this cannot be done) himself sharing his experience.
Thanks in advance!
Best regards,
Nikolay

rp0428 wrote:
Jonathan - none of those referenced articles seem to have a recommendation as to what is appropriate for the KEEP cache. There is a mention of a large frequently used object.eey
I thought that small lookup tables that were frequently used were the best candidates for the KEEP pool. Is this not the case?
That suggestion was a consequence of a bug with the touch count algorithm that has been fixed. If blocks were read by TABLESCAN then their touch count was never incremented, so they would always fall off the end of the buffer cache LRU fairly promptly, hence putting them into a KEEP cache would solve the problem. However if the table was being used as a lookup table - with primary key access - the problem didn't arise and if it were a popular lookup then the normal LRU mechanism would keep it cached.
Can you provide any links to your books or articles that have a recommendation on how to select objects for the keep pool?I don't think there are any - I think it's only possible to make a highly generic statement and then think about individual cases and watch out for unexpected side effects. (That's what my comments above, and the articles, are about).
From my perspective - every time I've tried to beat the LRU by creating a KEEP pool I haven't managed to do any better than the default LRU and all I've managed to do is limit the flexibility of the system by carving a load of memory off the main cache.
I have used the KEEP pool successfully - but not for "KEEP"ing; I've used it simply to cache LOBs in a small part of the cache. I've also had a couple of successes with the RECYCLE pool as a damaged limitation mechanism.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
Author: <b><em>Oracle Core</em></b>

Similar Messages

  • Scripts to identify small tables for keep pool

    I'm sorry for the double posting... seems my browser messed up and I didn't realize it posted already.
    Edited by: ji li on Dec 6, 2012 8:40 AM

    Hi
    Please find below script to find segments less than 1GB.
    select sum(bytes)/(1024*1024*1024) SIZE_IN_GB, segment_name from user_segments where bytes <1073741824 group by segment_name order by 1 asc
    Please try yourself !!
    Regards,
    Anand.

  • E-Recruiting Search functionality for Candidate in Talent Pool

    For search functionality of candidates in the talent pool, does anyone have any idea how the ranking percentage is calculated??  There is no clear documentation out there about what factors are used and how they are weighted.  I am aware that additional ranking that can be defined in the configuration and also questionaire results can influence this ranking as well.
    However, in the absence of this additional ranking in talent management and questionaire results to job postings, are the selection criteria for the search the only items taken into account for calculation for this ranking percentage? 
    What is everyone else's experiences in the fact that search functionality tends to treat the various selection criteria as 'OR' conditions?  The client I am working for is unhappy that candidates who don't match every set of selection criteria are being displayed on the hitlist.  Would like to hear what other client's responses has been to this...
    Sandra

    Had directed this question to SAP and did not get an adequate response to date with regards to how ranking is calculated.
    However, SAP did respond to why search functionality treating the various selection criteria as 'OR' conditions for searching candidates in Talent Pool.  This is due to configuration values in tables T77RCF_SRCH_ATTC and T77RCF_SRCH_ATTR.  The field RANKING must be set to blank value.  SAP delivers this as 'X' - ranking percentage is calculated.  This change now makes the combination of various selection criteria elements as 'AND' conditions, and the ranking percentage is no longer displayed.
    Sandra

  • Script to find out table and index candidates to keep in the buffer pool

    I am looking for a script to find out tables and indexes to keep in the buffer pool.
    Could you help me on this ?
    thanks...
    Markus

    this is more of a open question. As you know ur data well. We do not know whats ur data. cachin tables in buffer pool is okay, but it might age out after not being used...instead you can use the KEEP POOL...to cache small tables/popular tables into the keep pool...as keep pool guarantees full caching .....
    here are some links on keep pool cacheing
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#sthref410
    http://www.dba-oracle.com/oracle_tips_cache_small_fts.htm
    http://www.dba-oracle.com/t_script_automate_keep_pool_tables_indexes.htm
    http://www.dba-oracle.com/oracle_news/news_caching_keep_pool_large_objects_clob_blob.htm
    Edited by: user630084 on Apr 8, 2009 5:48 AM

  • Needing to add keep pool to SGA, sizing and checking for room?

    Hi all,
    I'm needing to experiment with pinning a table and index (recommended by COTS product vendor) to see if it helps performance.
    I'm trying to set up a keep pool...and put the objects in it
    I've gone into the database, and found that I will need to set up a keep pool:
    SQL> show parameter keep
    NAME TYPE VALUE
    buffer_pool_keep string
    control_file_record_keep_time integer 7
    db_keep_cache_size big integer 0
    That being said, and I'm having a HUGE senior moment right now...how
    do I go about making sure I have enough room to make a little keep
    pool?
    I've looked at my objects I want to put in there, and one is about
    .675 MB, and the other is about .370 MB. So, roughly a little more
    than 1MB
    Looking at my SGA parameters:
    SQL> show parameter sga
    NAME TYPE VALUE
    lock_sga boolean FALSE
    pre_page_sga boolean FALSE
    sga_max_size big integer 572M
    sga_target big integer 572M
    Now...how do I find out what is being used in SGA, to make sure I have room?
    I've been searching around, and trying to come up with some queries. I
    came up with this one:
    SQL> select name, value / (1024*1024) size_mb from v$sga;
    NAME SIZE_MB
    Fixed Size 1.97846222
    Variable Size 232.002007
    Database Buffers 332
    Redo Buffers 6.01953125
    From this, it appears everything is being used....so, not sure what to
    do from here.
    Suggestions and links greatly appreciated!
    cayenne

    SELECT SIZE_FOR_ESTIMATE, BUFFERS_FOR_ESTIMATE, ESTD_PHYSICAL_READ_FACTOR, ESTD_PHYSICAL_READS
      FROM V$DB_CACHE_ADVICE
        WHERE NAME          = 'KEEP'
         AND BLOCK_SIZE    = (SELECT VALUE FROM V$PARAMETER WHERE NAME = 'db_block_size')
         AND ADVICE_STATUS = 'ON';
    SELECT   ds.BUFFER_POOL,
             Substr(do.object_name,1,9) object_name,
             ds.blocks                  object_blocks,
             Count(* )                  cached_blocks
    FROM     dba_objects do,
             dba_segments ds,
             v$bh v
    WHERE    do.data_object_id = v.objd
             AND do.owner = ds.owner (+)
             AND do.object_name = ds.segment_name (+)
             AND do.object_type = ds.segment_type (+)
             AND ds.BUFFER_POOL IN ('KEEP','RECYCLE')
    GROUP BY ds.BUFFER_POOL,
             do.object_name,
             ds.blocks
    ORDER BY do.object_name,
             ds.BUFFER_POOL; Edited by: sb92075 on Jul 9, 2009 2:48 PM

  • Internal Error in Search for Candidate in Talent Pool in E-Recruitment

    Hi All,
    I've problem in Search in Candidates in Talent Pool in E-Recruitment in SAP E-Recruitment. When I search with text, it just gives internal error. I digged into the BSP Application as well. In the funtion call "SDOK_INDEX_COMBINED_SEARCH_XML" returns error "document area not specified" and raises an internal error. Anyone faced similar issue??? Please Help!!!
    Thx,
    Anand

    Well, obviously you never used any component of KPRO yet.
    Just upload an attachment onto the candidate's profile.
    An index category should automatically be created.
    Also generate search profiles and plan the periodical service RCF_PERIODICAL_SERVICES. You can find the documentation about this report and search profile via IMG.
    Also look if HR_KW is checked within transaction SKPR06.
    Message was edited by: Sebastian Menger

  • How can i decide candidates for line item dimension?

    1Q): we have many infocubes out of all these infocubes, i have to decide which infocubes are the candidates for lineitem dimension? How to do it? Please tell me the technical specs how to do the analysis to find out the candidates for line item dimension?
    2Q): if i have the small dimension can i combine all these dimension in to one dimension? what is the benefit of doing this? how to find out which dimensions are small?
    <u>Pizzaman i like to hear from you on this topic</u>. Thanks to SDN Community. i appreciate your help. Again Thank you.

    The process of figuring out what you might want to create as a line item dimension can vary a bit, it can depend a lot on your exisitng level of domain expertise (how well do you know the data in question). If you are familiar with the data, I would recommend you just take an initial guess at what you believe could be line item dimensions.  If you are not familiar witht the data, you might want to examine the source more to understand the cardinality of different characteristics and identify any relationships between characteristics. 
    I really encourage people to just go ahead and model it and load some data and review, rather than agonizing over developing the theoretically perfect model on paper before they start. You learn a lot more that way.
    Any of the SAP rules of thumb, are just that, general rules, not a pronouncement from God.  There are always extenuating or unique circumstances that might warrant disregarding the rule, e.g. if the InfoCube will never become very large, maybe some of the concerns just are not worth your effort.
    With every release of the Oracle (and the other DBs too)Oracle keeps getting better at data warehousing and star schemas. Oracle 10i is supposed to have made handling bitmap indices much more efficient, which is on of the  factors influencing the decision to create a line item dimension.      
    There are other threads on SDN on line item dims that provide more technical detail and can help answer you first question
    As far as 2Q - generally, it's better to have several small dimensions than one larger dimension. But having said that, combining a few <b>very small dimensions</b> into another  slightly larger (<i>but still small</i>) dimension is a good idea. It keeps the number of table joins down which will improve query performance. You would do this with characterisitcs that have very few values, e.g. yes/no indicators.
    e.g.
    You have 8 characteristics that all of which have only two values. You put them in one dimension, and the max size of the dimension table is still only 2x2x2x2x2x2x2x2 or 256 rows.  If you had these characteristics in other much larger dimensions, it's not hard to see it causing those dimensions to double, perhaps creating hundreds of thousands of dimension table rows to be created.
    For more - read   <a href="http://www.kimballgroup.com/html/designtipsPDF/DesignTips2003/KimballDT48DeClutter.pdf">Ralph Kimball Design Tip 48 - Junk Dimensions</a>

  • FTS on small Materialized View, should I cache it in the KEEP Pool ?

    Hi all,
    I have a small MV (1773 rows) that is used in a Query JOIN (the query & the explain plan is attached below). Although I already create index for the MV, it is always FTS in the query.
    I read a Tuning tips, that FTS on small table should be cached in the KEEP POOL, with this command :
    ALTER TABLE ITT.MV_CONVERT_UOM STORAGE (BUFFER_POOL KEEP);
    Should I do this ?
    Thank you for your help,
    xtanto.
    Query & explain PLAN :
    SELECT so_id_hdr, product_ord, qty_ord, UOM, MV.UOM_B, MV.UOM_K
    FROM SALESORDER_D SOD
    JOIN MV_CONVERT_UOM MV ON MV.PRODUCT = SOD.PRODUCT_ORD
    WHERE SO_id_hdr = 31944
    Plan hash value: 1323612888
    | Id  | Operation                         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | SELECT STATEMENT                  |                  |     5 |   225 |     5  (20)| 00:00:01 |        |      |            |
    |   1 |  PX COORDINATOR                   |                  |       |       |            |          |        |      |            |
    |   2 |   PX SEND QC (RANDOM)             | :TQ10001         |     5 |   225 |     5  (20)| 00:00:01 |  Q1,01 | P->S | QC (RAND)  |
    |*  3 |    HASH JOIN                      |                  |     5 |   225 |     5  (20)| 00:00:01 |  Q1,01 | PCWP |            |
    |   4 |     BUFFER SORT                   |                  |       |       |            |          |  Q1,01 | PCWC |            |
    |   5 |      PX RECEIVE                   |                  |     5 |   135 |     2   (0)| 00:00:01 |  Q1,01 | PCWP |            |
    |   6 |       PX SEND BROADCAST           | :TQ10000         |     5 |   135 |     2   (0)| 00:00:01 |        | S->P | BROADCAST  |
    |   7 |        TABLE ACCESS BY INDEX ROWID| SALESORDER_D     |     5 |   135 |     2   (0)| 00:00:01 |        |      |            |
    |*  8 |         INDEX RANGE SCAN          | SALESORDER_D_FKH |     5 |       |     1   (0)| 00:00:01 |        |      |            |
    |   9 |     PX BLOCK ITERATOR             |                  |  1773 | 31914 |     2   (0)| 00:00:01 |  Q1,01 | PCWC |            |
    |  10 |      MAT_VIEW ACCESS FULL         | MV_CONVERT_UOM   |  1773 | 31914 |     2   (0)| 00:00:01 |  Q1,01 | PCWP |            |
    Predicate Information (identified by operation id):
       3 - access("MV"."PRODUCT"="SOD"."PRODUCT_ORD")
       8 - access("SOD"."SO_ID_HDR"=31944)

    Hi Leo, below is execution plan for the query you gave :
    Plan hash value: 1323612888
    | Id  | Operation                         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | SELECT STATEMENT                  |                  |     5 |   200 |     5  (20)| 00:00:01 |        |      |            |
    |   1 |  PX COORDINATOR                   |                  |       |       |            |          |        |      |            |
    |   2 |   PX SEND QC (RANDOM)             | :TQ10001         |     5 |   200 |     5  (20)| 00:00:01 |  Q1,01 | P->S | QC (RAND)  |
    |*  3 |    HASH JOIN                      |                  |     5 |   200 |     5  (20)| 00:00:01 |  Q1,01 | PCWP |            |
    |   4 |     BUFFER SORT                   |                  |       |       |            |          |  Q1,01 | PCWC |            |
    |   5 |      PX RECEIVE                   |                  |     5 |   110 |     2   (0)| 00:00:01 |  Q1,01 | PCWP |            |
    |   6 |       PX SEND BROADCAST           | :TQ10000         |     5 |   110 |     2   (0)| 00:00:01 |        | S->P | BROADCAST  |
    |   7 |        TABLE ACCESS BY INDEX ROWID| SALESORDER_D     |     5 |   110 |     2   (0)| 00:00:01 |        |      |            |
    |*  8 |         INDEX RANGE SCAN          | SALESORDER_D_FKH |     5 |       |     1   (0)| 00:00:01 |        |      |            |
    |   9 |     PX BLOCK ITERATOR             |                  |  1773 | 31914 |     2   (0)| 00:00:01 |  Q1,01 | PCWC |            |
    |  10 |      MAT_VIEW ACCESS FULL         | MV_CONVERT_UOM   |  1773 | 31914 |     2   (0)| 00:00:01 |  Q1,01 | PCWP |            |
    ------------I have tried using index hints like below, but it stil FTS.
    EXPLAIN PLAN FOR     
    SELECT /*+ INDEX(MV_CONVERT_UOM MV_CONVERT_UOM_IDX1) */sod.so_id_hdr ,sod.product_ord ,
         sod.qty_ord ,sod.uom ,mv.uom_b ,
         mv.uom_k FROM SALESORDER_D sod ,
         MV_CONVERT_UOM mv WHERE mv.product = sod.product_ord AND
         sod.so_id_hdr = 31944
    what to do now ?
    Thank you,
    xtanto

  • Table size exceeds Keep Pool Size (db_keep_cache_size)

    Hello,
    We have a situation where one of our applications started performing bad since last week.
    After some analysis, it was found this was due to data increase in a table that was stored in KEEP POOL.
    After the data increase, the table size exceeded db_keep_cache_size.
    I was of the opinion that in such cases KEEP POOL will still be used but the remaining data will be brought in as needed from the table.
    But, I ran some tests and found it is not the case. If the table size exceeds db_keep_cache_size, then KEEP POOL is not used at all.
    Is my inference correct here ?
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - ProductionSetup
    SQL> show parameter keep                    
    NAME                                 TYPE        VALUE
    buffer_pool_keep                     string
    control_file_record_keep_time        integer     7
    db_keep_cache_size                   big integer 4M
    SQL>
    SQL>     
    SQL> create table t1 storage (buffer_pool keep) as select * from all_objects union all select * from all_objects;
    Table created.
    SQL> set autotrace on
    SQL>
    SQL> exec print_table('select * from user_segments where segment_name = ''T1''');
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> exec print_table('select * from user_segments where segment_name = ''T1''');
    SEGMENT_NAME                  : T1
    PARTITION_NAME                :
    SEGMENT_TYPE                  : TABLE
    SEGMENT_SUBTYPE               : ASSM
    TABLESPACE_NAME               : HR_TBS
    BYTES                         : 16777216
    BLOCKS                        : 2048
    EXTENTS                       : 31
    INITIAL_EXTENT                : 65536
    NEXT_EXTENT                   : 1048576
    MIN_EXTENTS                   : 1
    MAX_EXTENTS                   : 2147483645
    MAX_SIZE                      : 2147483645
    RETENTION                     :
    MINRETENTION                  :
    PCT_INCREASE                  :
    FREELISTS                     :
    FREELIST_GROUPS               :
    BUFFER_POOL                   : KEEP
    FLASH_CACHE                   : DEFAULT
    CELL_FLASH_CACHE              : DEFAULT
    PL/SQL procedure successfully completed.DB_KEEP_CACHE_SIZE=4M
    SQL> select count(*) from t1;
      COUNT(*)
        135496
    Execution Plan
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   538   (1)| 00:00:07 |
    |   1 |  SORT AGGREGATE    |      |     1 |            |          |
    |   2 |   TABLE ACCESS FULL| T1   |   126K|   538   (1)| 00:00:07 |
    Note
       - dynamic sampling used for this statement (level=2)
    Statistics
              9  recursive calls
              0  db block gets
           2006  consistent gets
           2218  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> /
      COUNT(*)
        135496
    Execution Plan
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   538   (1)| 00:00:07 |
    |   1 |  SORT AGGREGATE    |      |     1 |            |          |
    |   2 |   TABLE ACCESS FULL| T1   |   126K|   538   (1)| 00:00:07 |
    Note
       - dynamic sampling used for this statement (level=2)
    Statistics
              0  recursive calls
              0  db block gets
           1940  consistent gets
           1937  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 processedDB_KEEP_CACHE_SIZE=10M
    SQL> connect / as sysdba
    Connected.
    SQL>
    SQL> alter system set db_keep_cache_size=10M scope=both;
    System altered.
    SQL>
    SQL> connect hr/hr@orcl
    Connected.
    SQL>
    SQL> show parameter keep
    NAME                                 TYPE        VALUE
    buffer_pool_keep                     string
    control_file_record_keep_time        integer     7
    db_keep_cache_size                   big integer 12M
    SQL>
    SQL> set autotrace on
    SQL>
    SQL> select count(*) from t1;
      COUNT(*)
        135496
    Execution Plan
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   538   (1)| 00:00:07 |
    |   1 |  SORT AGGREGATE    |      |     1 |            |          |
    |   2 |   TABLE ACCESS FULL| T1   |   126K|   538   (1)| 00:00:07 |
    Note
       - dynamic sampling used for this statement (level=2)
    Statistics
              0  recursive calls
              0  db block gets
           1940  consistent gets
           1937  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> /
      COUNT(*)
        135496
    Execution Plan
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   538   (1)| 00:00:07 |
    |   1 |  SORT AGGREGATE    |      |     1 |            |          |
    |   2 |   TABLE ACCESS FULL| T1   |   126K|   538   (1)| 00:00:07 |
    Note
       - dynamic sampling used for this statement (level=2)
    Statistics
              0  recursive calls
              0  db block gets
           1940  consistent gets
           1937  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 processedDB_KEEP_CACHE_SIZE=20M
    SQL> connect / as sysdba
    Connected.
    SQL>
    SQL> alter system set db_keep_cache_size=20M scope=both;
    System altered.
    SQL>
    SQL> connect hr/hr@orcl
    Connected.
    SQL>
    SQL> show parameter keep
    NAME                                 TYPE        VALUE
    buffer_pool_keep                     string
    control_file_record_keep_time        integer     7
    db_keep_cache_size                   big integer 20M
    SQL> set autotrace on
    SQL> select count(*) from t1;
      COUNT(*)
        135496
    Execution Plan
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   538   (1)| 00:00:07 |
    |   1 |  SORT AGGREGATE    |      |     1 |            |          |
    |   2 |   TABLE ACCESS FULL| T1   |   126K|   538   (1)| 00:00:07 |
    Note
       - dynamic sampling used for this statement (level=2)
    Statistics
              0  recursive calls
              0  db block gets
           1943  consistent gets
           1656  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> /
      COUNT(*)
        135496
    Execution Plan
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   538   (1)| 00:00:07 |
    |   1 |  SORT AGGREGATE    |      |     1 |            |          |
    |   2 |   TABLE ACCESS FULL| T1   |   126K|   538   (1)| 00:00:07 |
    Note
       - dynamic sampling used for this statement (level=2)
    Statistics
              0  recursive calls
              0  db block gets
           1943  consistent gets
              0  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 processedOnly with 20M db_keep_cache_size I see no physical reads.
    Does it mean that if the db_keep_cache_size < table size, there is no caching for that table ?
    Or am I missing something ?
    Rgds,
    Gokul

    Hello Jonathan,
    Many thanks for your response.
    Here is the test I ran;
    SQL> select buffer_pool,blocks from dba_tables where owner = 'HR' and table_name = 'T1';
    BUFFER_     BLOCKS
    KEEP          1977
    SQL> select count(*) from v$bh where objd = (select data_object_id from dba_objects where owner = 'HR' and object_name = 'T1');
      COUNT(*)
          1939
    SQL> show parameter db_keep_cache_size
    NAME                                 TYPE        VALUE
    db_keep_cache_size                   big integer 20M
    SQL>
    SQL> alter system set db_keep_cache_size = 5M scope=both;
    System altered.
    SQL> select count(*) from hr.t1;
      COUNT(*)
        135496
    SQL> select count(*) from v$bh where objd = (select data_object_id from dba_objects where owner = 'HR' and object_name = 'T1');
      COUNT(*)
           992I think my inference is wrong and as you said I am indeed seeing the effect of tail end flushing the start of the table.
    Rgds,
    Gokul

  • Pattern for Thread Pool?

    Hi
    i want to build a kind of download manager. The application should be able to handle some concurrent threads, each representing a download in progress.
    I thought i might be more efficient to reuse a download thread after the download has ended as to create a new thread each time (like the connection object for db queries). Is this right? If yes, i thought to build a thread pool that serves a limited number of threaded download objects as requested (am I on the right way?).
    Now, I have to basic problems: (a) is it right, that, if the run() method of a thread has ended, the whole thread gets destroved? if yes, how should i prevent the thread from being destroyed, so i can reuse it later on? Second (b) how would that pool mechnism look like, means, there must be some kind of vector where i put in and take out the threads.
    As you see, these are basic "pool" technique questions. So, I thought, maybe there is a design pattern that would give me the basic mechanism, Does anyone know such a pattern?
    Thanks for your help
    josh

    I thought i might be more efficient to reuse a
    download thread after the download has ended as to
    create a new thread each time (like the connection
    object for db queries). Is this right? If yes, iIt may be right, if creating new threads is wasting enough CPU cycles to justify the complication of a thread pool. Maybe for a high-load server it would be more efficient. You'll have to figure that out for your own specific application.
    Another good use for thread pools is to avoid putting time-consuming operations in ActionListeners, etc. Instead you can have them pass the task off to a thread pool, keeping the GUI responsive.
    Now, I have to basic problems: (a) is it right, that,
    if the run() method of a thread has ended, the whole
    thread gets destroved? if yes, how should i prevent
    the thread from being destroyed, so i can reuse it
    later on? Second (b) how would that pool mechnism look
    like, means, there must be some kind of vector where i
    put in and take out the threads. (a) You are right. Therefore, the worker threads should not exit their run() methods until interrupted. (b) Worker threads could check a job queue (containing Runnables, perhaps) and if there are none, they should wait() on some object. When another thread adds a new job to the queue, it should call notify() on the same object, thus waking up one of the worker threads to perform the task.
    I wrote a thread pool once, just as an exercise. You will run into a number of problems and design issues (such as, what should the worker threads do when interrupted, exit immediately or clear the job queue and then exit?) If you have any more questions, ask in this thead.
    Krum

  • Cannot Load Index Into Keep Pool

    I've sucessfully loaded my ctxsys.context index into the keep pool (works great) using the web page: http://www.oracle.com/technology/products/text/htdocs/mem_load.html .
    I'm now trying the techniques to load a regular index (that joins to my text index).
    I've executed:
    alter index PROD_SVC_NDX storage (buffer_pool keep);
    Then I tried the hint INDEX_FFS on the base table:
    select /*+ INDEX_FFS ( INDEXDATA , PROD_SVC_NDX ) */ count(svc_code) FROM INDEXDATA ;
    The optimizer shows a ffs in the algorithm:
    INDEX FAST FULL SCAN| PROD_SVC_NDX |524K| 2047K|251 (2)| 0:00:04
    WHEN I QUERY THE BUFFER CACHE, only 9% of the index is in the keep pool..
    Owner............. Name...........................Type...........Cache....... %BLOCKS........POOL........BSize
    SYSTEM.......PROD_SVC_NDX...........INDEX..........1,248.................9..............KEEP.........8,192.
    How do you load regular index blocks into keep pool?
    What would be the best Oracle forum for this question?
    Joe

    I think the optimizer will always use a full scan for such a query, regardless of hints. What you need to do is fetch all rows individually. This can be done in a PL/SQL block with an outer loop which fetches all the indexed values, and an inner select that performs an indexed lookup with each value. For example:
    Given a table with a primary key index:
    create table foo (pk number primary key, bar varchar2);
    Populated:
    insert into foo values (1, 'aa');
    insert into foo values (2, 'ab');
    insert into foo values (3, 'ac');
    We could do this:
    declare
    v_bar varchar2(2);
    begin
    for q in (select pk from foo) loop
    select bar into v_bar from foo where pk = q.pk;
    end loop;
    end;
    It may well not be necessary to fetch every row - you should experiment and see whether maybe fetching every 10th row - or even every 100th row - is sufficient to fetch all index blocks into the SGA.
    - Roger

  • KEEP POOL and count(*)

    Hello,
    I resized db_keep_cache_size and altered tables and indexes -> storage (buffer_pool keep).
    Now, I think, I have to select * from tables.
    Is command select count(*) from table an equivalent please ?
    If I run select count(*), Disk activity is on 100% and it takes 2minutes. But when I run script, where is
    set termout off
    select * from table;
    set termout on
    It takes very very long time and activity is maybe on 5%. Could you help me with this please ?
    Thank you very much! :)

    Ondrej T. wrote:
    I'm creating application, only for one user. Data from tablespace are static - writing is not possible. Only reading.
    There are 4 tables ( 7+7+3+18 ) GB.
    I want to put them into keep pool. ( allocated 40GB)
    I altered tables and indexes. But the data will be in pull after execution
    select * from tables
    When I run this command, execution is very slow. Disk usage - 5%.
    1) Why? Termout is off...
    When I run app, there will be checkout if the tables are in pool, if not(server restart), it will execute select * from tables.
    So, why is it too slow?
    ( When I run select count(*) from table , disk usage is 100% )Reading 40G data from disk will take a while. Btw, do you have enough RAM to keep indexes of these tables?
    Have you waited until your first select complete? What about second run?
    Why don't you use an in-memory database solution such as TimesTen?
    Regards
    Gokhan

  • PUT large table in the keep pool?

    I would like to buffer a table in the keep pool:
    The table I would like to put in the keep pool is 200Mb (which is really large). The corresponding indices have a size of 70MB.
    Actually, many blocks of table are stored in the default pool. But some blocks of that huge table are not accessed for a long time. Thus they are purged from the default pool due to the LRU strategy (when blocks of other tables are queried and buffered)
    If the table (which is supposed to be in the keep pool) is queried again, the queried blocks have to be reloaded plus the corresponding index.
    All these reloads make up 600Mb in three hours, which could be saved, if the table and its indices are stored in the keep pool.
    The table itself has only one key field :-(
    The table has many many indices, because the table is accessed by many different fields :-(
    The table is changed by updates and insert 400 times in 3 hours :-( ---->indices are updated :-(
    I can not split that table :-(
    I can not increase the size of the cache :-(
    I dont know if response times (of queries targeting that table) would decrease significantly if the table is stored in the keep pool.
    What do you think? There must be a significant change in terms of the respnse time ??!?!

    Hi abapers,
    the error is here:
    DATA: lr_error TYPE REF TO cx_address_bcs.
    DATA: lv_message TYPE string.
    loop at tab_destmail_f into wa_destmail_f.   "or assigning fs
    TRY.
        recipient = cl_cam_address_bcs=>create_internet_address( wa_destmail_f-smtp_addr ).
    >>>>>>>>    send_request->add_recipient( recipient ).
      CATCH cx_address_bcs INTO lr_error.
        lv_message = lr_error->get_text( ).
    ENDTRY.
    endloop.
    The messages are:
    Zugriff über 'NULL' Objektreferenz nicht möglich.
    Access via 'NULL' object reference not possible.
    Err.tmpo.ejec.         OBJECTS_OBJREF_NOT_ASSIGNED
    Excep.                 CX_SY_REF_IS_INITIAL
    Fecha y hora           21.01.2010 19:00:55
    The information of   lv_message is:
    {O:322*CLASS=CX_ADDRESS_BCS}
    Excepción CX_ADDRESS_BCS ocurrida (programa: CL_CAM_ADDRESS_BCS============CP, include CL_CAM_ADDRESS_BCS============CM01W, línea: 45)
    I don't find the solution, any saving code?
    This is very important to me. Thanks a lot for your help!

  • Table caching in keep pool!!

    Hello,
    I have read several threads on the net that we rarely need to cache any table (99.9999....% people don't need it). We have a table which is frequently used during our service flow, the size of the table is 981M(8m rows) approx and memory_target is set to 22G.
    We have also requests to cache most of the frequently accessed tables in cache some are small and some are moderate in size like the above. I myself not convinced to fulfill this request and i also don't have strong logical explanation that caching will become a bottleneck in the future.
    Is it explainable that keeping the said table in cache requires much more space in the cache, if not, it will eventually aged out?? For example, in case of updates?
    Please guide me in this regard.
    Regards,
    Raja.

    There is a dependency on what else is in the pool. Presumably a non-default pool would be smaller than a default pool, and a misunderstanding of block copy mechanisms (which of course vary by version) could lead to undersizing the pool, kicking off needed blocks unnecessarily, to where it would have been better to just leave everything in the default pool and let Larry sort it out.
    Of course full scans into the PGA, what is small?, direct I/O and a gazillion other things mean it depends, depends, depends. Not to mention [url http://jonathanlewis.wordpress.com/2010/03/20/not-keeping/]large objects assigned to the KEEP pool will always do buffered IO and never direct IO (regardless of the size of the object scan)   if bugs don't stop the object from going in in the first place.

  • I need help in configuring keep pool.

    Hi All,
    From my awrrpt report my db is experiencing small table table-full scans. Now I am planning to configure keep pool. I need to know how to calculate keep pool size.And what will be the impact/implications if I configure keep pool.
    Please give advice for me.
    Regards,
    Kiran

    Aman,
    I thought I'd written at least one "official" note on it, but I can't find anything. However, here's a reference to an old news thread (2003) where the old behaviour was noted for 8i and 9i.
    http://groups.google.com/group/comp.databases.oracle.server/browse_frm/thread/a62e495f62feb9f2/f3627c964d63071c
    My comments start at note 16.
    There's probably a news items somewhere where I point out the behaviour changed in 10g (possibly only R2).
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

Maybe you are looking for

  • ITunes rental download error

    Hi, My iPad almost downloaded an movie rental, but at one point, the download stopped: "Download error. Tap to retry." • I have tried Tap several times, it starts again, processing, and than stop again • I have restarted iPad, same problem • I have s

  • Font issue - how to troubleshoot?

    Hey all, I'm having a problem with my new MacBook Pro - I've only recently started using OS X. I'm a linguistics major, and Snow Leopard is giving me trouble with accents and diacritics. For instance, when I try to combine i with a grave accent (`),

  • Preview.app and multipage tiff files (page number)

    I scan completed job folders at my company and store the resulting files on a server for users to access. They are a multipage .tif format which is basically a fax file format that is very common among document scanners. Preview is pretty good at vie

  • Inventory Reports MM/QM

    Hello, Can anyone tell me what are the Reports that can be used for Inventory/stocks for QM. Basically we need a report for Inventory in Quality Inspection and in Restricted Stock. Is there a Report that can be ran by a Plant and give all the materia

  • BPM counter script

    just needed a manual bpm counter, partially to practice perl, but also cuz i dont like the audacity auto bpm counter.  I like to manually click to the beat... but thats just me. It works, but the output isnt rly pretty.  should i print another line t