Oracle Table Indexes

Hello.
I'm in the process of putting some indexes on tables for performance improvement of queries run.
eg the foll query -
SELECT MPH_ENTITY_ID, MPH_PRICE_DT, MPH_STCK_EXCHNG_ID, BPT_BP_SHRT_NM, MPH_SEC_ID, SEC_SEC_NM, NMS_SEC_NUM, MPH_PRICE_TYP, MPH_MKT_PRC, MPH_VENDOR, MPH_PRICE_TIME, MPH_EXCHNG_RATE, MPH_DENOM_UNIT, MPH_LOCL_CNC_EQVU, MPH_INDCTV_PRC_IND, MPH_VLM_TRDD, MPH_MRKT_CPTL, MPH_MKT_PRICE_HSTRY_VER, BPT_BSNS_PRTNR_VER, SEC_SEC_MASTER_VER FROM MPH_MKT_PRICE_HSTRY left outer join NMS_NUM_SCHEME on NMS_SEC_ID=MPH_SEC_ID AND NMS_NUM_SCHM='CUSIP',BPT_BSNS_PRTNR,SEC_SEC_MASTER WHERE MPH_ENTITY_ID=BPT_ENTITY_ID AND MPH_STCK_EXCHNG_ID=BPT_BP_ID AND MPH_SEC_ID=SEC_SEC_ID ORDER BY MPH_SEC_ID DESC
The Explain plan in PL/SQL developer shows "Table Access Full" scan for 2 tables - BPT_BSNS_PRTNR AND MPH_MKT_PRICE_HSTRY.
I created the foll 2 indexes and now the explain plan shows "index fast full" scan on these tables -
1) create index mph_3 on mph_mkt_price_hstry(MPH_ENTITY_ID, MPH_PRICE_DT, MPH_STCK_EXCHNG_ID, MPH_SEC_ID, MPH_PRICE_TYP, MPH_MKT_PRC, MPH_VENDOR, MPH_PRICE_TIME, MPH_EXCHNG_RATE, MPH_DENOM_UNIT, MPH_LOCL_CNC_EQVU, MPH_INDCTV_PRC_IND, MPH_VLM_TRDD, MPH_MRKT_CPTL, MPH_MKT_PRICE_HSTRY_VER);
2) create index BPT_8 on bpt_bsns_prtnr(BPT_BP_SHRT_NM,BPT_BSNS_PRTNR_VER,BPT_ENTITY_ID,BPT_BP_ID);
My question here is that I have included columns in the select clause also in the indexes and the scan type has improved from table access full to index fast full scan. Is this correct ? Should select columns be also a part of indexes ? My take was that indexes contain columns in "where" clause or columns where joins are implemented and not select columns.
Please suggest.

An Index that includes all the columns of the SELECT clause with those of the WHERE clause is a "skinny table".
Using such an Index avoids accesses to the table entirely.
There are situations where the DBA or Designer may choose to create such an Index.
Downsides ?*
If there are too many columns in the Index, the Index itself may become too large. When the index is too large for Oracle to be able to cache blocks, Oracle may have to undertake multiple single block read calls to the OS if accessing many rows. This can make the index counter-productive.
Index maintenance overheads increase -- the probability that the index also has to be updated with every UPDATE statement on the table increases. Also, every INSERT and DELETE makes that much more effort updating the Index Leaf Blocks (ie the size of the update to the Index is larger, the Index Key being larger).
Some queries might be executed using Skip Scan Search of the index when, properly, it might have made more sense to put those query columns in a seperate index.

Similar Messages

  • How to compute a global SCORE over a few oracle text indexed tables?

    Dear experts!
    I want to search a website with Oracle Text. The website consists of four tables:
    - site
    - chapter
    - text
    - binaries
    Each table has two or three columns which should be indexed with oracle text. So I have created a MULTI_COLUMN_DATASTORE oracle text index on each table - So I have four indexes on my website.
    When I want to search over the website I have to join my 4 tables (4 contain clauses). So how do I get a global SCORE over these 4 contains clauses?
    The next question is can I change the weight of my text indexes (useful for the search hit list)? For example the highest weight has the site index, the second highest weight the chapter index and so on?
    Thanks
    Markus

    If it's a simple JOIN, then you could just add the scores for each CONTAINS clause
    select score(1)+score(2)+score(3)+score(4)
    from table1 t1,table2 t2, table3 t3,table4 t4
    where [join conditions]
    and contains(t1.col, 'xxx', 1) > 0 or
    contains(t2, col, 'xxx', 2) > 0 or
    ... etc
    then to change the weight you just add a multiplying factor.
    Can't help thinking it's probably more complex than this, though.

  • Oracle Sys table index rebuild

    hi, expert
    I am new to this expert Forums
    Blow Table Index are rebuild,This table are relation with sys user or not?
    after rebuild index, getting error in alert log file
    ORA-00600: internal error code, arguments: [psdnop-1], [1410], [], [], [], [], [], [], [], [], [], []
    ORA-01410: invalid ROWID
    when trying to select * from dba_network_acls getting error massage Rowid invalid
    ALTER INDEX CTXSYS.SYS_C003684 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003683 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003682 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003681 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54056 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003677 REBUILD;
    ALTER INDEX CTXSYS.SYS_IL0000054052C00002$$ REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54044 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003675 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54038 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54031 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54028 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54018 REBUILD;
    ALTER INDEX CTXSYS.DR_STOPLIST_PK REBUILD;
    ALTER INDEX CTXSYS.DR_STOPLIST_UNIQ REBUILD;
    ALTER INDEX CTXSYS.DR_THS_BT REBUILD;
    ALTER INDEX CTXSYS.DR_UNIQ_THS_BT REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54003 REBUILD;
    ALTER INDEX CTXSYS.DR_THS_RINGID REBUILD;
    ALTER INDEX CTXSYS.DR_UNIQ_THS_PHRASE REBUILD;
    ALTER INDEX CTXSYS.SYS_C003629 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003626 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003627 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_53991 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_53963 REBUILD;
    ALTER INDEX OLAPSYS.SYS_C004604 REBUILD;
    ALTER INDEX OLAPSYS.SYS_C004600 REBUILD;
    ALTER INDEX XDB.SYS_C003740 REBUILD;
    ALTER INDEX XDB.SYS_C003741 REBUILD;
    ALTER INDEX XDB.SYS_C003742 REBUILD;
    ALTER INDEX MDSYS.UNIQUE_CLASS_CONSTRAINT REBUILD;
    ALTER INDEX MDSYS.UNIQUE_USER_CONSTRAINT REBUILD;
    ALTER INDEX MDSYS.UNIQUE_LRS_GEOM_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_LINK_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_NODE_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_PATH_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_PATH_LINK_LAYER REBUILD;
    It is possible to recreate this index again to solve this problem, or any other solution.
    Thanks in Advance sir,

    Pl do not post duplicate threads - Oracle sys Index rebuild then Getting error Invalid Error Ora-01410

  • ORACLE TEXT INDEX생성시 TABLE ROW별로 LOG를 남기는 방법

    제품 : ORACLE SERVER
    작성날짜 : 2004-05-27
    ORACLE TEXT INDEX생성시 TABLE ROW별로 LOG를 남기는 방법
    ========================================================
    PURPOSE
    이 문서에서는 Text index생성시 처리하는 각 row 단위로 log를 남기는 방법을
    설명한다.
    Explanation
    Document 가 많이 저장된 large table에 Text index를 생성할 때 index 가
    어느 정도까지 진행되었는 지, 또는 어느 document에서 indexing이 실패했는 지
    등을 알기를 원할 수 있다. 이를 위해 table의 data를 처리하는 각 row level로
    indexing 시의 log를 남기는 방법을 사용하면 문제 해결이나 진행 상황을 확인하는
    데 더 편리할 수 있다.
    이 기능의 사용방법을 아래와 같이 알아보자.
    1. Logging 시작
    SQL> EXEC CTX_OUTPUT.START_LOG('ctx_log');
    Log file이 생성되는 Default 위치는 $ORACLE_HOME/ctx/log 이다.
    2. Table의 Row level 로 logging을 남기기 위해 아래의 event를 추가한다.
    SQL> EXEC CTX_OUTPUT.ADD_EVENT(CTX_OUTPUT.EVENT_INDEX_PRINT_ROWID);
    3. Text index를 생성한다.
    4. Index생성이 끝난 후에 Logging기능을 끝낸다.
    SQL> EXEC CTX_OUTPUT.END_LOG;
    Reference Documents
    Oracle9i Text Application Developer's Guide Release
    <Note:213001.1>

  • Need to find total no fo  tables/index/m.views in my database

    Hello Everyone ;
    How can i find total no fo  tables/index/m.views in my database ?
    when i  google  i have seen  following  command ;
    SQL> Select count(1) from user_tables where table_name not like '%$%' /
      COUNT(1)
             but i dont understand  what  '%$%'  indicates ?
    Thanks all ;

    Hello Everyone ;
    How can i find total no fo  tables/index/m.views in my database ?
    when i  google  i have seen  following  command ;
    SQL> Select count(1) from user_tables where table_name not like '%$%' /
      COUNT(1)
             but i dont understand  what  '%$%'  indicates ?
    Thanks all ;
    consider to simply Read The Fine Manual YOURSELF!
    Oracle Database Search Results: like

  • How to insert Serialised Object(XML DOM) into Oracle Table(as BLOB or CLOB)

    we need a urgent help. How can we insert and retrieve the XML Document DOM Object into Oracle Table.Actually we used BLOB for insert the DOM Object,its inserted finely but we have a problem in retrieving that object, we got error when v're retrieving. so could you anyone tell us what's this exact problem and how can we reslove this problem If anyone knows or used this kind operation, pls let us know immediately.
    Thanks in advance.

    Please repost your question in the appropriate XML forum, http://forums.oracle.com/forums/index.jsp?cat=51

  • New tables & indexes created do not show up in dba_segments view

    Dear all,
    I have created 3 tables and some indexes, but these objects do not show up in dba_segments view. Is this a normal behaviour? Previously, with dictionary managed tablespace, I can specify the minimum extent to create, when the table/index is created. But I'm not sure how the locally managed tablespace work. Please do advice. Thank you very much in advance.
    I'm using Oracle 11g R2 (11.2.0.1.0) for Microsoft Windows (x64), running on Windows 7.
    For the purpose of reproducing this issue, I have created the tablespaces as follow:
    CREATE TABLESPACE CUST_DATA
    DATAFILE 'd:\app\asus\oradata\orcl11gr2\CUST_DATA01.DBF' SIZE 512K
    AUTOEXTEND ON NEXT 256K MAXSIZE 2000K
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
    SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE CUST_INDX
    DATAFILE 'd:\app\asus\oradata\orcl11gr2\CUST_INDX.DBF' SIZE 256K
    AUTOEXTEND ON NEXT 128K MAXSIZE 2000K
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K
    SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLE CUSTOMER_MASTER (CUST_ID VARCHAR2 (10),
    CUST_NAME VARCHAR2 (30),
    EMAIL VARCHAR2 (30),
    DOB DATE,
    ADD_TYPE CHAR (2) CONSTRAINT CK_ADD_TYPE CHECK (ADD_TYPE IN ('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, TABLESPACE_NAME
    2 FROM USER_TABLES
    3 WHERE TABLE_NAME LIKE 'CUST%';
    TABLE_NAME TABLESPACE_NAME
    CUSTOMER_MASTER CUST_DATA
    SQL> SELECT INDEX_NAME, TABLESPACE_NAME
    2 FROM USER_INDEXES
    3 WHERE TABLE_NAME LIKE '%CUST%';
    INDEX_NAME TABLESPACE_NAME
    PK_CUSTOMER_MASTER CUST_INDX
    SQL> SELECT SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME, BYTES
    2 FROM USER_SEGMENTS;
    no rows selected

    Prior to 11g, when you created a table or whatever, you automatically allocated one extent.
    This is now no longer true and depends on a parameter I don't remember.
    dba_segments is a summary of dba_extents.
    Obviously, if there is no extent allocated, the table (view is defined with inner join) will not show up.
    You could qualify this is as a bug and submit a SR to Oracle. But then the performance impact may be huge.
    Sybrand Bakker
    Senior Oracle DBA

  • "how to load a text file to oracle table"

    hi to all
    can anybody help me "how to load a text file to oracle table", this is first time i am doing, plz give me steps.
    Regards
    MKhaleel

    Usage: SQLLOAD keyword=value [,keyword=value,...]
    Valid Keywords:
    userid -- ORACLE username/password
    control -- Control file name
    log -- Log file name
    bad -- Bad file name
    data -- Data file name
    discard -- Discard file name
    discardmax -- Number of discards to allow (Default all)
    skip -- Number of logical records to skip (Default 0)
    load -- Number of logical records to load (Default all)
    errors -- Number of errors to allow (Default 50)
    rows -- Number of rows in conventional path bind array or between direct path data saves (Default: Conventional path 64, Direct path all)
    bindsize -- Size of conventional path bind array in bytes (Default 256000)
    silent -- Suppress messages during run (header, feedback, errors, discards, partitions)
    direct -- use direct path (Default FALSE)
    parfile -- parameter file: name of file that contains parameter specifications
    parallel -- do parallel load (Default FALSE)
    file -- File to allocate extents from
    skip_unusable_indexes -- disallow/allow unusable indexes or index partitions (Default FALSE)
    skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable (Default FALSE)
    commit_discontinued -- commit loaded rows when load is discontinued (Default FALSE)
    readsize -- Size of Read buffer (Default 1048576)
    external_table -- use external table for load; NOT_USED, GENERATE_ONLY, EXECUTE
    (Default NOT_USED)
    columnarrayrows -- Number of rows for direct path column array (Default 5000)
    streamsize -- Size of direct path stream buffer in bytes (Default 256000)
    multithreading -- use multithreading in direct path
    resumable -- enable or disable resumable for current session (Default FALSE)
    resumable_name -- text string to help identify resumable statement
    resumable_timeout -- wait time (in seconds) for RESUMABLE (Default 7200)
    PLEASE NOTE: Command-line parameters may be specified either by position or by keywords. An example of the former case is 'sqlldr scott/tiger foo'; an example of the latter is 'sqlldr control=foo userid=scott/tiger'. One may specify parameters by position before but not after parameters specified by keywords. For example, 'sqlldr scott/tiger control=foo logfile=log' is allowed, but 'sqlldr scott/tiger control=foo log' is not, even though the position of the parameter 'log' is correct.
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\PFS2004.CTL LOG=D:\PFS2004.LOG BAD=D:\PFS2004.BAD DATA=D:\PFS2004.CSV
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\CLAB2004.CTL LOG=D:\CLAB2004.LOG BAD=D:\CLAB2004.BAD DATA=D:\CLAB2004.CSV
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.CTL LOG=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.LOG BAD=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.BAD DATA=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.CSV

  • Is it permissable to extend an SAP-provided table index?

    (Please note I realize this might not be the best forum for this post; I did look at ABAP development, SAP on Oracle, and a few others, but given some other threads, it seemed like this might be the best place for it.  Apologies if not).
    We have a very large table (GMIA), and I noticed that two customer-created indexes can essentially be combined into one because the first index is RGRANT_NBR plus fields A and B, and the second index is RGRANT_NBR plus fields A, B, C, D, and E.  So I might as well get rid of the first index and just keep the second one having RGRANT_NBR plus fields A through E.
    However, I noticed that SAP-provided index 4 contains simply one field - RGRANT_NBR.  So ideally, I could just add fields A, B, C, D, and E to index 4, then I could get rid of my second customer-created index.
    Question:  Is it permissable to extend an SAP-provided index like this?  As a developer, I'm not in the modifying SAP objects business, but this is the first time I've been presented this situation with a table index.  Given that our GMIA table has MILLIONS of records in it, getting rid of another customer-created index completely might be a great opportunity.
    Thoughts?
    Dave

    I really don't have a requirement for this.  I'm a developer, and I've noticed some of our biggest timeout issues concern programs that hit table GMIA.  So I thought I'd take a look at GMIA and our indexes to learn more about it via SE11 and DB02.
    In our Production environment, we have over 88 million records in this table for a table size of 38.23 GB.  Aside from the 6 SAP-provided indexes, 8 customer indexes have been created by others over time.  It was in looking at these indexes that I noticed our 8th customer index, ZS8, is essentially the same 3 fields as ZS3, plus a few more fields.  Ideally, ZS8 should NOT have been created, and ZS3 should have simply been extended with the additional fields.
    It was suggested to me in another thread a long while back that I could potentially get rid of ZS3 as well and just make SAP index 4 look like ZS8 because SAP index 4 is just indexed by Grant Number (RGRANT_NBR).  ZS8's first index field is Grant Number followed by 5 or 6 additional fields.  That's why I was wondering if it was even a "thing" or a possibility to extend an SAP index, but customizing an SAP component makes Dave a very, VERY nervous boy.
    Basically, I'm alarmed at the number of records in the table and the number of indexes we have.  There's no archiving strategy here, so I probably can't do anything about the number of records in GMIA, which go back to 2006 when we first went live with SAP.  But I can clearly get rid of one customer-created index (ZS3).  And if I can deactivate SAP index 4, I would assume the system would then automatically use ZS8 since the first field is Grant Number for situations where it would have used SAP index 4.
    So that's the background here.  Honestly, I don't know how much improvement these things will make, but getting rid of ZS3 will save 5 GB of space, and presumably "deactivating" SAP index 4 would save almost 5 GB as well.  I'm assuming we might see some negligible performance gains on our table operations involving GMIA, but it's still a beast with a large number of indexes, so I don't know.
    I'm really, really interested in hearing from others' thoughts and recommendations -- your input is MOST welcome here!
    Dave

  • Oracle text indexed view is possible

    Oracle text indexed view is possible???

    ok,
    My table name is T_DOC :
    ID----------------> NUMBER(30)
    DESCRIPTION-------> VARCHAR2(2000 BYTE)
    DOC---------------> BLOB
    FILENAME----------> VARCHAR2(2000 BYTE)
    MIMETYPE----------> VARCHAR2(2000 BYTE)
    LAST_UPDATE_DATE--> DATE
    T_DOC
    | Id | DESCRIPTION | DOC | FILENAME | MIMETYPE | LAST_UPDATE_DATE |
    | 1 | THE DOG | *(!BLOB) | THE_CAT.PDF | application/pdf | 20/05/2010 15:06:15 |
    | 2 | THE BIRD | **(!BLOB) | THE_BIRD.PDF | application/pdf | 20/05/2010 15:06:15 |
    | 3 | THE HUMAN AND CAT | ***(!BLOB) | THE_HUMAN.PDF | application/pdf | 20/05/2010 15:06:15 |
    * is a document .pdf with content: "the dog and cat"
    ** is a document .pdf with content: "the bird in house"
    *** is a document .pdf with content: "the human from USA"
    Index the columns DESCRIPTION, DOC (document content), FILENAME
    begin
    ctx_ddl.create_preference('idxDoc_lx', 'BASIC_LEXER');
    ctx_ddl.set_attribute (' idxDoc_lx ', 'MIXED_CASE', 'NO');
    end;
    begin
    ctx_ddl.create_preference('idxDoc_ds', 'MULTI_COLUMN_DATASTORE');
    ctx_ddl.set_attribute ('idxDoc_ds', 'COLUMNS', 'DOC, FILENAME, DESCRIPTION');
    end;
    CREATE INDEX IDX_DOC
    ON T_DOC (FILENAME)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('lexer idxDoc_lx
    datastore idxDoc_ds
    filter CTXSYS.AUTO_FILTER
    sync (on commit)');Search Query:
    select ID
    from T_DOC
    where CONTAINS (DOCUMENTO, 'CAT', 1) > 0 RESULT ID = 1
    WHY NOT ALSO Returned ID 3 ??????

  • Why oracle text index column taking long  time

    why oracle text index column is taking long time to return result.I created text index on a column if I run the query on a single table result is very fast.If I join table with other table (10 records only )
    it is taking long time but in explain plan it is searching by index only.
    I created this index for searching a varchar2 column,the data is comma seperated values like ( UK,US,IT,BR) and the table having records 20 lakhs.Normally if I query with like operater
    ( like '%US%' ) it is taking full table scan because I am using '%' both sides. Please help me on this regard how to search the data with less time. Here is may sample code and explain plan.
    SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jan 28 16:54:22 2009
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL&gt; set timing on
    SQL&gt; set linesize 180
    SQL&gt; explain plan for SELECT T.esongid FROM (SELECT A.ESONGID FROM wcmedeco.EDECO_ESONGS_TERR_CTRY 
    A WHERE CONTAINS(A.TERR_CTRY_NAMES,'US')&gt;0  
      2  GROUP BY A.ESONGID)K,T
      3  WHERE  K.ESONGID=T.ESONGID;
    Explained.
    Elapsed: 00:00:00.01
    SQL&gt; select *from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation                      |  Name                   | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT               |                         |     1 |    26 |     4 |
    |   1 |  NESTED LOOPS                  |                         |     1 |    26 |     4 |
    |   2 |   VIEW                         |                         |     1 |    13 |     4 |
    |   3 |    SORT GROUP BY               |                         |     1 |    89 |     4 |
    |   4 |     TABLE ACCESS BY INDEX ROWID| EDECO_ESONGS_TERR_CTRY  |     1 |    89 |     2 |
    |   5 |      DOMAIN INDEX              | IDX_TERR_CTRY_NAMES     |       |       |     0 |
    |   6 |   INDEX RANGE SCAN             | IDX_ESONGID_T           |     1 |    13 |     1 |
    PLAN_TABLE_OUTPUT
    Note: cpu costing is off, 'PLAN_TABLE' is old version
    14 rows selected.
    Elapsed: 00:00:00.00
    SQL&gt; Regards,
    Rajasekhar

    You have not formatted your code properly so we cannot see the query you're executing. Please put some line breaks in.
    Secondly, how fresh are the statistics on those tables? Are you really returning one record out of twenty million?
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Oracle Text Index Query

    Hello
    Had a query on oracle Text Index.
    1. I have created a table with column ID as sequence & column description as Varchar2(500)
    2. Inserted 3 records
    3. I created the Oracle Text index on column "description" as INDEXTYPE IS CTXSYS.CONTEXT
    4. Run a select using "contains" , get the records as required.
    5. I insert another new record & commit;
    6. Run the same old query using contains but for the new records I get 0 records
    7. Drop the Index and Recreate the index using same old index on column "description" as INDEXTYPE IS CTXSYS.CONTEXT
    8. Run the same old query using contains but for the new records and now I get the records as required.
    Does that mean every time I insert new records I have to rebuild the Oracle Text Index ?
    Your Help will be much appreciated
    Regards
    Harshad

    You need to use some method of updating your index. You can drop and recreate or you can rebuild or you can use ctx_ddl.sync_index or you can include sync(on commit) in your parameters when you create the index or various other methods of periodic synchronization and optimization.

  • Oracle Table Storage Parameters - a nice reading

    bold Gony's reading excercise for 07/09/2009 bold -
    The below is from the web source http://www.praetoriate.com/t_%20tuning_storage_parameters.htm. Very good material.The notes refers to figures and diagrams which cannot be seen below. But the text below is ver useful.
    Let’s begin this chapter by introducing the relationship between object storage parameters and performance. Poor object performance within Oracle is experienced in several areas:
    Slow inserts Insert operations run slowly and have excessive I/O. This happens when blocks on the freelist only have room for a few rows before Oracle is forced to grab another free block.
    Slow selects Select statements have excessive I/O because of chained rows. This occurs when rows “chain” and fragment onto several data blocks, causing additional I/O to fetch the blocks.
    Slow updates Update statements run very slowly with double the amount of I/O. This happens when update operations expand a VARCHAR or BLOB column and Oracle is forced to chain the row contents onto additional data blocks.
    Slow deletes Large delete statements can run slowly and cause segment header contention. This happens when rows are deleted and Oracle must relink the data block onto the freelist for the table.
    As we see, the storage parameters for Oracle tables and indexes can have an important effect on the performance of the database. Let’s begin our discussion of object tuning by reviewing the common storage parameters that affect Oracle performance.
    The pctfree Storage Parameter
    The purpose of pctfree is to tell Oracle when to remove a block from the object’s freelist. Since the Oracle default is pctfree=10, blocks remain on the freelist while they are less than 90 percent full. As shown in Figure 10-5, once an insert makes the block grow beyond 90 percent full, it is removed from the freelist, leaving 10 percent of the block for row expansion. Furthermore, the data block will remain off the freelist even after the space drops below 90 percent. Only after subsequent delete operations cause the space to fall below the pctused threshold of 40 percent will Oracle put the block back onto the freelist.
    Figure 10-83: The pctfree threshold
    The pctused Storage Parameter
    The pctused parameter tells Oracle when to add a previously full block onto the freelist. As rows are deleted from a table, the database blocks become eligible to accept new rows. This happens when the amount of space in a database block falls below pctused, and a freelist relink operation is triggered, as shown in Figure 10-6.
    Figure 10-84: The pctused threshold
    For example, with pctused=60, all database blocks that have less than 60 percent will be on the freelist, as well as other blocks that dropped below pctused and have not yet grown to pctfree. Once a block deletes a row and becomes less than 60 percent full, the block goes back on the freelist. When rows are deleted, data blocks become available when a block’s free space drops below the value of pctused for the table, and Oracle relinks the data block onto the freelist chain. As the table has rows inserted into it, it will grow until the space on the block exceeds the threshold pctfree, at which time the block is unlinked from the freelist.
    The freelists Storage Parameter
    The freelists parameter tells Oracle how many segment header blocks to create for a table or index. Multiple freelists are used to prevent segment header contention when several tasks compete to INSERT, UPDATE, or DELETE from the table. The freelists parameter should be set to the maximum number of concurrent update operations.
    Prior to Oracle8i, you must reorganize the table to change the freelists storage parameter. In Oracle8i, you can dynamically add freelists to any table or index with the alter table command. In Oracle8i, adding a freelist reserves a new block in the table to hold the control structures. To use this feature, you must set the compatible parameter to 8.1.6 or greater.
    The freelist groups Storage Parameter for OPS
    The freelist groups parameter is used in Oracle Parallel Server (Real Application Clusters). When multiple instances access a table, separate freelist groups are allocated in the segment header. The freelist groups parameter should be set the number of instances that access the table. For details on segment internals with multiple freelist groups, see Chapter 13.
    NOTE: The variables are called pctfree and pctused in the create table and alter table syntax, but they are called PCT_FREE and PCT_USED in the dba_tables view in the Oracle dictionary. The programmer responsible for this mix-up was promoted to senior vice president in recognition of his contribution to the complexity of the Oracle software.
    Summary of Storage Parameter Rules
    The following rules govern the settings for the storage parameters freelists, freelist groups, pctfree, and pctused. As you know, the value of pctused and pctfree can easily be changed at any time with the alter table command, and the observant DBA should be able to develop a methodology for deciding the optimal settings for these parameters. For now, accept these rules, and we will be discussing them in detail later in this chapter.
    There is a direct trade-off between effective space utilization and high performance, and the table storage parameters control this trade-off:
    For efficient space reuse A high value for pctused will effectively reuse space on data blocks, but at the expense of additional I/O. A high pctused means that relatively full blocks are placed on the freelist. Hence, these blocks will be able to accept only a few rows before becoming full again, leading to more I/O.
    For high performance A low value for pctused means that Oracle will not place a data block onto the freelist until it is nearly empty. The block will be able to accept many rows until it becomes full, thereby reducing I/O at insert time. Remember that it is always faster for Oracle to extend into new blocks than to reuse existing blocks. It takes fewer resources for Oracle to extend a table than to manage freelists.
    While we will go into the justification for these rules later in this chapter, let’s review the general guidelines for setting of object storage parameters:
    Always set pctused to allow enough room to accept a new row. We never want to have a free block that does not have enough room to accept a row. If we do, this will cause a slowdown since Oracle will attempt to read five “dead” free blocks before extending the table to get an empty block.
    The presence of chained rows in a table means that pctfree is too low or that db_block_size is too small. In most cases within Oracle, RAW and LONG RAW columns make huge rows that exceed the maximum block size for Oracle, making chained rows unavoidable.
    If a table has simultaneous insert SQL processes, it needs to have simultaneous delete processes. Running a single purge job will place all of the free blocks on only one freelist, and none of the other freelists will contain any free blocks from the purge.
    The freelist parameter should be set to the high-water mark of updates to a table. For example, if the customer table has up to 20 end users performing insert operations at any time, the customer table should have freelists=20.
    The freelist groups parameter should be set the number of Real Application Clusters instances (Oracle Parallel Server in Oracle8i) that access the table.

    sb92075 wrote:
    goni ,
    Please let go of 20th century & join the rest or the world in the 21st century.
    Information presented is obsoleted & can be ignored when using ASSM & ASSM is default with V10 & V11I said the same over here for the exactly same thread, not sure what the heck OP is upto?
    Oracle Table Storage Parameters - a nice reading
    regards
    Aman....

  • Oracle Text index hangs(Oracle 11g linux enterprise edition)

    Hi guru,
    One very criticial and showstopper issue coming in Oracle Text Indexing.
    I have table ResourceTable(ResId,Contents blob ,docformat)
    I am creating text index on Contents column by using follwing command:
    create index [IndexName] on [TableName] (contents) indextype is ctxsys.context ('lexer mylex stoplist ctxsys.default_stoplist format column ISDOCFORMAT sync(every "sysdate+1/24") storage my_text_storage memory 200M')parallel 2
    I found there is one document of text/html type which hangs oracle text indexing thread.Oracle doest not give any error message keep using CPU 100% and no progress.
    I then create test table with same stucture and put this corrupted documet record in this table.and did indexing again but its not doing index /not ignoring it and hangs .We have also tried to use timeout feature of inso filter so that if such type of document comes at the time of indexing oracle text indexing process will bypass it after specific time interval but still same issue comes and oracle is not bypassing such faulty document.
    This is realy show stopper issue and any kind of help will be greatly appricited.

    You need to raise an SR with Oracle Support for this, and send them the file which is causing the hang. It should then be easy to investigate the problem and schedule a fix.
    If you don't have a support contract, you could send the file to me and I'll raise a bug. However, if we fix it you won't be able to get the fix until it appears in the next downloadable version.
    - Roger
    roger.ford @ oracle.com

  • Copy data from Berkeley DB to Oracle tables

    Hello
    I need to get data from Berkeley DB to Oracle tables.
    Any help/tools to this?
    Thanks for your help in advance.
    So far
    1. I asked developers to dump BDB in flat file.
    2. Created external tables & loaded into permanent table using CTAS.
    Cheers

    Hi Shekhar,
    External tables managed by the Oracle DB Server are a way to go.
    However, I would suggest using any of the Berkeley DB Core APIs (C, C++, Java) along with its appropriate correspondent on the Oracle DB side, that is, OCI (Oracle Call Interface, C API), OCCI (Oracle C++ Call Interface) and, respectively, JDBC or SQLJ. You may also use the Oracle DB Precompilers, Pro*C/C++ along with the correspondent Berkeley DB API, C/C++.
    If you have Metalink access, you may consult the KM Note 756126.1, where I've discussed how to import Oracle DB data into Berkeley DB databases (the opposite of what you're trying to do), using OCI on the Oracle DB side and the C API on the Berkeley DB side; there is a code example in the note to explain how to perform this task.
    Doing the data copying the other way around is not difficult; you'll need to iterate through the Berkeley DB database with a cursor and use appropriate OCI DML statements (INSERT INTO) to write the data to the Oracle DB table. Note that you may also use OCI to execute the DDL statements (CREATE TABLE) to create the Oracle DB table into which data will be copied, or do that separately using SQL*Plus, PL/SQL dynamic native SQL etc before copying the data.
    Bellow are the links for the Berkeley DB documentation page where you'll find each of the BDB APIs and the Oracle DB Application Development documentation section where you'll find the development guides for Oracle Call Interface, JDBC and SQLJ:
    [Oracle Berkeley DB|http://www.oracle.com/technology/documentation/berkeley-db/db/index.html]
    [Oracle DB Application Development|http://www.oracle.com/pls/db102/portal.portal_db?selected=5]
    Best regards,
    Andrei

Maybe you are looking for

  • Use of EXIST clause

    Need to seek advice on the use of EXISTS clause. What is this statement trying to do? What is the '1' in the inner SELECT statement means? DELETE FROM a WHERE NOT EXISTS (SELECT 1 FROM b WHERE a.a_id = b.a_id); What about these 2 statements doing?? S

  • My serial number is not accepted, how to proceed  (my card says: ActivationCode, should I have a separate serial number?)

    My serial number is not accepted, how to proceed  (my card says: ActivationCode, should I have a separate serial number?)

  • How do I download a new address book application?

    My son deleted Address Book and now he wants its back. A software restore did not put the address book back. How do I find a way to download a new copy of the application Address Book? (He also deleted Mail app but I transferred mine over to his comp

  • Custom Email/noti​fication Profile

    I know this has been mentioned in another post.. but PLEASE PLEASE PLEASE blackberry get this back in there... never in a million years would I have thought you would strip that service away... We all have several email accounts, facebook, bbm etc et

  • Synchronous Webservice

    Hi all, I need to have a synchronous webservice to communicate with a synchronous send step in BPM.the output message of the webservice is defined and its of more relevence but cant specify the input message of the webservice.whether i need to make a