Context Index Peformance

Hi,
I want to create a context index on one column which contains large text. And the table contains millions of records and daily inserts happen into the same table. My question is
1.Do we need to run any procedures after inserting the records daily i.e synchronization??
2.Is there any problem from performace point of view creating context index on the table??
Thanks,
Sri

hi,
pls have a take a look this doc
http://docs.oracle.com/cd/B19306_01/text.102/b14217/ind.htm
http://stackoverflow.com/questions/1916244/how-to-sync-and-optimize-an-oracle-text-index
regards,

Similar Messages

  • Creation of context index on index-organized table

    I encountered a problem when creating a domain index(intermediate text context index) on a index-organised table in oracle 8i.
    The description of the error is stated below:
    "ORA-29866: cannot create domain index on a column of index-organized table "
    I have configured intermediate text properly and even it worked for those tables which are not index-organised(ordinary tables).
    This problem has occured only when i made the tables as index organised.
    Please provide us a solution to this problem as early as possible.
    In case if you require any more details i shall provide them.

    Please ask questions about Oracle Text (formerly interMedia text) in the Oracle Text forum. You will get a quicker, more expert answer there.

  • Creation of context index on index-organized tables

    I encountered a problem when creating a domain index(intermediate text context index) on a index-organised table in oracle 8i.
    The description of the error is stated below:
    "ORA-29866: cannot create domain index on a column of index-organized table "
    I have configured intermediate text properly and even it worked for those tables which are not index-organised(ordinary tables).
    This problem has occured only when i made the tables as index organised.
    Please provide us a solution to this problem as early as possible.
    In case if you require any more details i shall provide them.

    creation of domain indexes (such as context) on iot's
    is not currently supported in oracle.

  • Error in Updating ctxsys.context index using ctxsrv

    Environment :
    Linux 6.2,
    Oracle 8.1.6
    character set : zhs16gbk or zhs16cgb231280
    I can create an ctxsys.context index(using CHINESE_VGRAM_LEXER) on a long column, and i can rebuild this index with no parameters.
    When i want to rebuild this index automatic using ctxsrv, this error occur ---
    DRG-50857 Oracle error in drtldml(dml)
    Ora-2000 error
    anybody can help me?
    null

    the complete error:
    Dml batch: cid=1023
    End batch: return code is 1
    DRG-50857: oracle error in drtldml(dml)
    ORA_20000: interMedia text 4mNs
    DRG-50857: oracle error in drsxsopen
    ORA-01480: STR83V51dA?H1IY?U:sW:
    null

  • CONTEXT index vs a CTXCAT index

    I'm puzzled as to which of these indexes is meant for what purpose. I like the auto-update feature of the CTXCAT index, so I'm leaning that direction.
    Here's our situation. We have a table with about 2 million rows, where there's an EMPLOYER_NAME field. Users are constantly executing queries like:
    where EMPLOYER_NAME like '%CHEVRON%'The CTXCAT index is also described as "Typically, with this index type, you index small documents or text fragments". I would consider this EMPLOYER_NAME column (VARCHAR2(50)) to fit this description, more or less.
    The main thing that has me confused is that our vendor is pushing for a CONTEXT index, as they've got experience setting these up. We're not storing "text consists of large coherent documents.", but we are storing plain text.
    Could someone offer some guidance? Thanks for your help,
    --=Chuck

    Depends on whether the words are predictable. You indicated in your first post they are employer names. If they are then presumably there is a table/list of valid values. Otherwise a CTX index may be your best shot but understand that you will be indexing every word and, I assume, most will be irrelevant.

  • Use CONTEXT index on mview or use mview's rewrite directly

    Please let me explain what I mean in Subject. I have 9 tables. Each of these tables has about 40,000 rows and one table has 2 million rows. Using first approach, I can build a join-only materialized view on top of nine table's mview log. then query on these nine tables directly. Advantage for doing that is use rewrite.
    <p>
    for second approach, I build a CONETXT index on several columns on the mview, and then query through CONTEXT index on mview directly. This is pretty much like Barbara did on CREATE INDEX book_idx ON book_search
    [http]Indexing multiple columns of multiple tables using CTXCAT
    but she used CTXCAT instead of CONTEXT index.
    <p>
    My question is will second approach better than first one and why. Unlike basic join several tables which gives you predictable performance, I often feel that CONTEXT index performance is unpredictable when tables have more than several thousands rows (maybe I did something wrong, but still looking for document regarding performance) .
    <p>
    I will appreciate someone could show hints on the issue.
    <p>
    Message was edited by:
    qwe15933
    Message was edited by:
    qwe15933
    Message was edited by:
    qwe15933
    Message was edited by:
    qwe15933

    The best method to find out what is best for any individual situation is to test and compare. In general, Oracle Text is best at searching unstructured data, such as large documents and has a lot of features that enable you to do different kinds of searches. If you only have structured data, with each column only containing one short thing and you only need simple searches, then you probably don't need Text. There are also a few things that can be done to indexes and/or queries to optimize performance. It would help to have an idea what your typical data is like and what sorts of searches you anticipate needing.

  • Performance of context index with sorting

    Dear All,
    I've got a problem and don't know how to solve this.
    there has a table which have a XMLTYPE field to store the unstructred xml, and created with context index.
    When I try to select a record from it by using contains (res, '[searchingfield]')>0, the response time is quick, but when I try to order by another field which in the same table, the response time is drop down slightly. (ex. select id, path, res, update_date from testingtbl where contains(res, 'shopper')>0 order by update_date desc.
    Actually there is a context index build for field 'res', any other index build for field 'update_date', when sql without 'order by update_date', the context index will use, but the update_date index will not be used even have ordering criteria.
    Is there any expect can tell how to solve this? how to keep the performance even doing the sorting process?
    Thanks and Regards
    Raymond

    Thanks for your quick reply.
    The mentions information provide after back to office, actually I just want to know if there is any method(s) which can use the context index (with contains keyword) and sorting without slow down the performance.
    Thanks and Regards
    Raymond

  • Context index and contains operator syntax how it works ?

    Hi
    I create a context index on four collumns (text_prof, text_gest, text_citizen, text)
    of the same table content.
    When i have more than one collumn being queryed using the contains syntax, oracle display the ora 29907 error saying found duplicated labels in primary invocations .
    This query works:
    SELECT * FROM content WHERE cod_type = '1'
    AND (UPPER(title) LIKE UPPER('%tabagismo%')
    OR contains (text, 'tabagismo',1)>0
    This not works:
    SELECT * FROM content
    WHERE cod_type = '1' AND (
    UPPER(title) LIKE UPPER('%tabagismo%')
    OR contains (text, 'tabagismo',1)>0
    OR contains (text_citizen,'tabagismo',1)>0
    OR contains (text_gest,'tabagismo',1)>0
    OR contains (text_prof,'tabagismo',1)>0
    How can i fix it ?
    I need to query all these colluns !
    Does the contains operator can be used only in one collumn?
    Thank´s in advance

    Hi
    I create a context index on four collumns (text_prof, text_gest, text_citizen, text)
    of the same table content.
    When i have more than one collumn being queryed using the contains syntax, oracle display the ora 29907 error saying found duplicated labels in primary invocations .
    This query works:
    SELECT * FROM content WHERE cod_type = '1'
    AND (UPPER(title) LIKE UPPER('%tabagismo%')
    OR contains (text, 'tabagismo',1)>0
    This not works:
    SELECT * FROM content
    WHERE cod_type = '1' AND (
    UPPER(title) LIKE UPPER('%tabagismo%')
    OR contains (text, 'tabagismo',1)>0
    OR contains (text_citizen,'tabagismo',1)>0
    OR contains (text_gest,'tabagismo',1)>0
    OR contains (text_prof,'tabagismo',1)>0
    How can i fix it ?
    I need to query all these colluns !
    Does the contains operator can be used only in one collumn?
    Thank´s in advance

  • Context Index and performance

    Hi,
    I want to create a context index on one column which contains large text. And the table contains millions of records and daily inserts happen into the same table. My question is
    1.Do we need to run any procedures after inserting the records daily?
    2.Is there any problem from performace point of view creating context index on the table
    Thanks,
    Sri

    sri333 wrote:
    Hi,
    I want to create a context index on one column which contains large text. And the table contains millions of records and daily inserts happen into the same table. My question is
    1.Do we need to run any procedures after inserting the records daily?Not for what you describe. But you didn't describe much. I guess you will do something with this table data later. It depends from that. But since you only mentioned that you insert. Then no there is nothing to do after that.
    2.Is there any problem from performace point of view creating context index on the tableSure. Creating the index takes time. If the index is there new inserts will take more time.
    Edited by: Sven W. on Oct 10, 2012 12:02 PM

  • Context index can't be used in complicated multiple tables join?

    hello
    thank you for view this page.
    i have a comlicated sql :
    SELECT count(*)
    from
    ((app_AssetBasicInfo left join app_AssetBasicInfoExt on
    app_AssetBasicInfo.id=app_AssetBasicInfoExt.id) left join
    (app_AssetCustominfo1 left join app_AssetCustominfoExt1 on
    app_AssetCustominfo1.id=app_AssetCustominfoExt1.id) on
    app_AssetBasicInfo.id=app_AssetCustominfo1.id) WHERE
    app_AssetBasicInfo.CategoryID=1 AND Del_tag=0 and contains(description,'department')>0;
    the table app_AssetBasicInfo and app_AssetBasicInfoExt have multiple columns and large recoord size. i create a context index on app_assetbasicinfoext(description) which description is 4000 varchar2.
    but the sql doesn't use context index. i suspect that the complicated multiple table join can't use context index? does it correct?
    thanks very much!

    Could you please post an explain plan? I'm not quite sure what is the issue.

  • Context Index World Lexer ORA-03113: end-of-file on communication channel

    I have release 10g Release 1 (10.1.0.2.0) for Windows and trying to take advantage of the World Lexer.
    My table is:
    create table worldtest(
    filename char(32),
    content blob
    I've created a preference for the WORLD_LEXER:
         begin
         ctx_ddl.create_preference('wlex', 'WORLD_LEXER');
         end;
    Right now I'm working with 10,000 records of PDF, MS-Word, Text, and HTM documents. When I try and create a context index using this lexer:
    create index i_ctx_wc on worldtest(content)
    indextype is ctxsys.context
    parameters ('lexer wlex');
    The following error is returned, and I have to use drop index force to remove the index. Without 'Force' a message is return saying the index is an a loading state, but nothing is occuring.
    create index i_ctx_wc on worldtest(content)
    indextype is ctxsys.context
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    The indexing works fine when I leave the world lexer preference out.
    Any suggestions would be wonderful. I've been banging my head on this one for a while.
    Thanks.

    Hi,
    I couldn't reproduce (different version which is perhaps the problem). Check out bug 4056162. ORA-3113 related to the use of the world lexer. The resolution is not published externally, so no help there, but the bug is closed so perhaps support can provide some insight.
    Thanks.

  • Context index on small texts

    Hello all,
    After reading the main differences between CTXCAT and Context indexes, I realised that CTXCAT is used for small texts.
    In my case I need to index a username, firstname and lastname of a person.
    I tried CTXCAT but it doesn't support Left truncation, ( same as LIKE '%word' ). It only supports right and middle truncation (same as LIKE 'word1%' , LIKE
    'word1%word2'), etc.
    And CTXCAT does not return any rank, while I need to order the results by the highest rank.
    Is it possible to use Context Index on those really small text columns ? Each column is of datatype varchar2(50).
    Your opinions please.

    Hi,
    it is indeed possible and you get indeed more functionality. By using context index you must be aware that is not transactional out of the box. Ctxcat has the advantage it can also index other columns other then the column on which the index is made.
    I used it also on the same kind of columns you use (especially lastname) and I hit no issue (Oracle 10g and 11g).
    Another option could be to create normal Btree indexes, but then you also have no score and maybe problems with left truncation queries.
    Herald ten Dam
    http://htendam.wordpress.com

  • Trying to understand context indexes and contains-help

    Hi
    i am using
    Achieving functionality of many preferences using one context index
    to understand context indexes and contains
    and i get the following
    Error starting at line 1 in command:
    begin
    ctx_ddl.create_preference ('nd_mcds', 'multi_column_datastore');
    ctx_ddl.set_attribute ('nd_mcds', 'columns', 'text nd, text text');
    ctx_ddl.create_section_group ('nd_sg', 'basic_section_group');
    ctx_ddl.add_ndata_section ('nd_sg', 'nd', 'nd');
    ctx_ddl.create_preference ('test_lex', 'basic_lexer');
    ctx_ddl.set_attribute ('test_lex', 'whitespace', '/\|-_+');
    end;
    Error report:
    ORA-06550: line 5, column 15:
    PLS-00302: component 'ADD_NDATA_SECTION' must be declared
    ORA-06550: line 5, column 7:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    so i am using the following to check for the error
    http://docs.oracle.com/cd/E18283_01/text.112/e16593/cddlpkg.htm#BABCBFCB
    plus
    oracle text application developer's guide
    plus
    oracle text reference
    but these have not listed that error (i have even googled this in vain)
    background::we were actually using catsearch but because of its downsides i want to implement this
    Is Achieving functionality of many preferences using one context index a good place to start when one does not know about
    context and contains??
    please post any other useful link for contains and context index that even explains
    1) fuzzy
    2) stem
    3) synonym
    4) near
    5) soundex
    6)ndata
    7)lexer
    thanks in advance

    Ndata is new to Oracle 11g. Your other posts indicate that you are using Oracle 10g, so you don't have ndata, so you get an error when you try to use it. If you want to use the 11g features that enable context indexes with contains to do all of the things that ctxcat indexes with catsearch do, then you need to upgrade to 11g.
    The online documentation is searchable. Most things regarding Oracle Text are contained in either the Oracle Text Reference or the Oracle Text Application Developer's guide.
    I suggest that you start with something very simple, then build from there.
    The following is similar to your other post that used catsearch:
    SCOTT@orcl_11gR2> CREATE TABLE mv_cat_seg_reg_prod
      2    (cat_ids       VARCHAR2 ( 7),
      3       act_status    VARCHAR2 (10),
      4       name           VARCHAR2 ( 1),
      5       email           VARCHAR2 ( 1),
      6       address1      VARCHAR2 ( 1),
      7       address2      VARCHAR2 ( 1),
      8       contact_name  VARCHAR2 ( 1),
      9       mobile           VARCHAR2 ( 1),
    10       telephone     VARCHAR2 ( 1))
    11  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO mv_cat_seg_reg_prod VALUES
      3    ('1', 'Y', 'A', 'B', 'C', 'D', 'E', 'F', 'G')
      4  INTO mv_cat_seg_reg_prod VALUES
      5    ('2', 'N', 'H', 'I', 'J', 'K', 'L', 'M', 'N')
      6  SELECT * FROM DUAL
      7  /
    2 rows created.
    SCOTT@orcl_11gR2> CREATE INDEX mv_cat_seg_reg_prod_idx
      2  ON mv_cat_seg_reg_prod (cat_ids)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    Index created.
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$mv_cat_seg_reg_prod_idx$i
      2  /
    TOKEN_TEXT
    1
    2
    2 rows selected.
    SCOTT@orcl_11gR2> SELECT *
      2  FROM   (SELECT SCORE (1), name, email, address1, address2, contact_name, mobile, telephone
      3            FROM   mv_cat_seg_reg_prod
      4            WHERE  CONTAINS (cat_ids, '1', 1) > 0
      5            AND    act_status = 'Y'
      6            ORDER  BY DBMS_RANDOM.VALUE)
      7  WHERE  ROWNUM < 8
      8  /
      SCORE(1) N E A A C M T
             4 A B C D E F G
    1 row selected.

  • Privileges require for a user to create CONTEXT indexes

    Hi all,
       RDBMS: 11.2.0.3
       SO.......: OEL 6.3
       What are the necessary privileges that have to be granted to a user to be able to create CONTEXT Indexes, for example. I have granted the CTXAPP to my user, but when i tryied to create the CONTEXT Index with the command bellow, i got an "insufficient privilege" error message.
       CREATE INDEX USR_DOCS.IDX_CTX_TAB_DOCUMENTOS_01 ON USR_DOCS.TAB_DOCUMENTOS(DOCUMENTO) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SYNC (ON COMMIT)');

    It depends on whether the user is trying to create the index on his own table in his own schema or on somebody else's table in somebody else's schema.  The following demonstrates minimal privileges (quota could be smaller) for user usr_docs to create the index on his own table in his own schema and for my_user to create the index on usr_docs table in usr_docs schema.
    SCOTT@orcl> -- version:
    SCOTT@orcl> SELECT banner FROM v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0    Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl> -- usr_docs privileges:
    SCOTT@orcl> CREATE USER usr_docs IDENTIFIED BY usr_docs
      2  /
    User created.
    SCOTT@orcl> ALTER USER usr_docs QUOTA UNLIMITED ON users
      2  /
    User altered.
    SCOTT@orcl> GRANT CREATE SESSION, CREATE TABLE TO usr_docs
      2  /
    Grant succeeded.
    SCOTT@orcl> -- my_user privileges:
    SCOTT@orcl> CREATE USER my_user IDENTIFIED BY my_user
      2  /
    User created.
    SCOTT@orcl> GRANT CREATE SESSION, CREATE ANY INDEX TO my_user
      2  /
    Grant succeeded.
    SCOTT@orcl> -- user_docs:
    SCOTT@orcl> CONNECT usr_docs/usr_docs
    Connected.
    USR_DOCS@orcl> CREATE TABLE tab_documentos (documento  CLOB)
      2  /
    Table created.
    USR_DOCS@orcl> INSERT ALL
      2  INTO tab_documentos VALUES ('test data')
      3  INTO tab_documentos VALUES ('other stuff')
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    USR_DOCS@orcl> CREATE INDEX USR_DOCS.IDX_CTX_TAB_DOCUMENTOS_01
      2  ON USR_DOCS.TAB_DOCUMENTOS(DOCUMENTO)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS ('SYNC (ON COMMIT)')
      5  /
    Index created.
    USR_DOCS@orcl> DROP INDEX usr_docs.idx_ctx_tab_documentos_01
      2  /
    Index dropped.
    USR_DOCS@orcl> -- my_user:
    USR_DOCS@orcl> CONNECT my_user/my_user
    Connected.
    MY_USER@orcl> CREATE INDEX USR_DOCS.IDX_CTX_TAB_DOCUMENTOS_01
      2  ON USR_DOCS.TAB_DOCUMENTOS(DOCUMENTO)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS ('SYNC (ON COMMIT)')
      5  /
    Index created.

  • Substring search with Oracle context indexes

    Hi,
    i would like to know if it is possibile to do a substring search with one of the obtion offer with the context indexes.
    (ctxcat,ctxrule,context)
    example:
    i would like to search the word 'berub' in a column A in table_example.
    the value in the column a are :
    The betther
    berube
    A.berube
    berub
    Berub
    BERUB
    R berube
    S tartif
    Y Thibeault
    the rows return should be :
    berube
    A.berube
    berub
    Berub
    BERUB
    R berube
    A simple sql could be
    select * from table_example where upper(a) like upper('%berub%' );
    How i can do this same action with the context indexes and a select (catsearch, contains, matches), if it is possible?
    A example will be welcome
    Thanks

    I know how to do explain plan.
    my point is not the query i post, it's just a example.
    I have many query on my production we optimize many times (they past from 3min to 15 sec with optimisation, but we want to have better result). At this point we are looking to implant the context indexes to make them more efficient.
    Do make this sql more efficient we have to deal with like '%xxxxxx%' and the context indexes like to be a option, but we have to be able to do some substring search with context option.
    Is it possible to do it and how?
    This is my question and why i post it here. The query is just a simple example to illsutrate what i want.
    Thanks to anyone who can answer my question.

Maybe you are looking for