Oracle Text (schema CTXSYS): additional licence costs?

Hi,
it's my understanding that through installing and using Oracle-Text (schema CTXSYS) no additional licence costs arise (for Oracle Enterprise Edition).
I'm asking this question in this forum just to be sure that my understanding is not wrong...
Many thanks
JH

As far as I know this is correct.
Oracle Text is neither listed as an Entreprise Edition option in US price list:
http://www.oracle.com/us/corporate/pricing/technology-price-list-070617.pdf
nor in Licensing Information:
http://download.oracle.com/docs/cd/E11882_01/license.112/e10594/toc.htm .
Edited by: P. Forstmann on 9 août 2011 10:25

Similar Messages

  • Getting error while importing schema with ORACLE TEXT

    IMP-00003: ORACLE error 20000 encountered
    ORA-20000: Oracle Text error:
    DRG-52204: error while registering index
    DRG-10507: duplicate index name: WORKORDER_Q, owner: SYS
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.DRIIMP", line 115
    ORA-06512: at line 2
    IMP-00088: Problem importing metadata for index WORKORDER_Q. Index creation will be skipped
    Database version - Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Os version - Linux nlxs1012.slb.atosorigin-asp.com 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
    We have take export of schema from production db now importing data to qa environment..
    In import facing above error..

    I am importing objects from P20_MAXIMO to Q25_MAXIMO to another database..
    Below is import par file..
    USERID='/ as sysdba'
    FILE=exp_P20_MAXIMO_C2364781.dmp
    LOG=imp_P20_MAXIMO__Q25_MAXIMO_C2364781_1.log
    FROMUSER=P20_MAXIMO
    TOUSER=Q25_MAXIMO
    buffer=1000000
    feedback=100000
    Export parfile
    userid='/ as sysdba'
    owner=P20_MAXIMO
    FILE=exp_P20_MAXIMO_C2364781.dmp
    LOG=exp_P20_MAXIMO_C2364781.log
    buffer=10000000
    feedback=100000
    statistics=none

  • Oracle Text in installing Oracle 10g without licence!!

    Hi. Everyone.
    I've read some thread , but I am still confused about "oracle text".
    Now, I am testing oracle10g database.
    I downloaded 10g software from www.oracle.com, and installed it sucessfully
    on windows xp.
    When I was trying to import a dump file from oracle9i to
    the unlicenced oracle10g database, I got the error , IMP-00017, which
    is related to "Oracle Text".
    I checked "dba_users" dictionary, but ctxsys user is locked and expired.
    I read some thread on this site, and according to the advice, I tried to
    enable oracle text, using "DBCA".
    However, every database option on DBCA is disabled, I was not able to
    check oracle text.
    Lastly, how can I enable "Oracle Text" with unlicenced oracle 10g ?
    Is this possible without licence?
    I am very confused about this.
    I am looking forward to hear your experience and advices.
    Have a nice day.
    Best Regards.
    Ho.

    Well, instead of being confused, you could go to http://www.oracle.com/pls/db102/portal.portal_db?selected=1 and look at
    1) the licensing document, which would tell you whether you need a separate license, and
    2) under the 'Books' tab, look at the Text Application Developer's Guide or the Text Reference manuals for details.
    You could also look for the Oracle Text forum (from the http://forums.oracle.com page, under Database - More, or Text and ask the people who concentrate on that set of features.
    In general, Oracle Text is a set of extensions, the definitions for which are stored under user ctxsys. You would use these extensions by creating your own objects that are based on the extensions.
    For example, suppose your tables contain varchar2 columns. Create indexes that are based on ctxsys's 'context index type' and your application can then use the 'CONTAINS' keyword search capability (which is effectively a ctxsys-owned extension to the select)
    However, you would never log on to ctxsys and do anythibng with that as you risk changing the template code that Oracle has supplied.
    Message was edited by:
    Hans Forbrich
    PS: Yes, Oracle Text is included as part of the base database. Most of it is even included in the free Oracle XE database.

  • Oracle Text Index Error - DRG-10700: preference does not exist: CTXSYS.DEFA

    Hi we are having a Oracle 11g db.And we have installed CTX SYS package and provided the grants to the required schema.
    But while creating the oracle text index, following error is thrown:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 365
    Following grnats are given :
    GRANT EXECUTE ON CTXSYS.CTX_DDL TO <schema_name>;
    GRANT APPOWN TO <schema_name>;
    GRANT CTXAPP TO <schema_name>;
    I have verifyed the ctxsys.CTX_PREFERENCES view which is having an entry as :
    SELECT PRE_OWNER, PRE_NAME
    FROM CTXSYS.CTX_PREFERENCES
    WHERE PRE_NAME = 'DEFAULT_LEXER';
    The Result is :
    PRE_OWNER     PRE_NAME
    SYS     DEFAULT_LEXER
    Can you please assist if there is a way to update the permission on this DEFAULT_LEXER preference to set the PRE_OWNER as CTXSYS ?
    Thanks

    That's odd. If I run the same query I see:
    SQL> SELECT PRE_OWNER, PRE_NAME
      2  FROM CTXSYS.CTX_PREFERENCES
      3  WHERE PRE_NAME = 'DEFAULT_LEXER';
    PRE_OWNER                      PRE_NAME
    CTXSYS                         DEFAULT_LEXERAre all your defaults like thsi? What do you see if you run
    select pre_owner, pre_name from ctxsys.ctx_preferences where pre_name like 'DEFAULT%';
    It would be easy enough to update the underlying table DR$PREFERENCES to fix the owner, but who knows what else might be wrong.
    Has this database been updated from a 9i installation by any chance?

  • Oracle Text, create index (indextype is ctxsys.context)

    Dear sirs,
    I am a new user of Oracle Text (Oracle 11g release 11.2) and I am unable to create an index of type ctxsys.context). Any suggestions?:
    code:
    drop table mytable;
    drop index myindex force;
    create table mytable(id number primary key, docs clob);
    insert into mytable values(111555,'this text will be indexed');
    insert into mytable values(111556,'this is a default datastore example');
    commit;
    create index myindex on mytable(docs)
    indextype is ctxsys.context
    parameters ('DATASTORE CTXSYS.DEFAULT_DATASTORE');
    +++++++
    error messages:
    create index myindex on mytable(docs)
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366

    Please check for invalid objects. Log on as sys or system and run:
    select owner, object_name, object_type from all_objects where status='INVALID';
    Post the results here and we'll advise the next step.
    If any objects owned by CTXSYS are invalid you may need to recompile the CTXSYS schema.

  • ERROR at line 1: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine ORA-20000: Oracle Text error: DRG-10700: preference does not exist: global_lexer ORA-06512: at "CTXSYS.DRUE", line 160 ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366

    database version 11.2.0.4
    rac two node
    CREATE INDEX MAXIMO.ACTCI_NDX3 ON MAXIMO.ACTCI
    (DESCRIPTION)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('lexer global_lexer language column LANGCODE')
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10700: preference does not exist: global_lexer
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366

    Like the error message says, you don't have a global_lexer.  So, you need to create a global_lexer and that lexer must have at least a default sub_lexer, then you can use that global_lexer in your index parameters.  Please see the demonstration below, including reproduction of the error and solution.
    SCOTT@orcl12c> -- reproduction of problem:
    SCOTT@orcl12c> CREATE TABLE actci
      2    (description  VARCHAR2(60),
      3      langcode     VARCHAR2(30))
      4  /
    Table created.
    SCOTT@orcl12c> CREATE INDEX ACTCI_NDX3 ON ACTCI (DESCRIPTION)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS('lexer global_lexer language column LANGCODE')
      4  /
    CREATE INDEX ACTCI_NDX3 ON ACTCI (DESCRIPTION)
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10700: preference does not exist: global_lexer
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366
    SCOTT@orcl12c> -- solution:
    SCOTT@orcl12c> DROP INDEX actci_ndx3
      2  /
    Index dropped.
    SCOTT@orcl12c> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('global_lexer', 'multi_lexer');
      3    CTX_DDL.CREATE_PREFERENCE ('english_lexer', 'basic_lexer');
      4    CTX_DDL.ADD_SUB_LEXER ('global_lexer', 'default', 'english_lexer');
      5  END;
      6  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> CREATE INDEX ACTCI_NDX3 ON ACTCI (DESCRIPTION)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS('lexer global_lexer language column LANGCODE')
      4  /
    Index created.

  • Are there any licencing costs for Oracle Clients ?

    11.2/Solaris 10
    In my shop, we only install Oracle Client of type Instaclient (not the 'Administrator' type). Instaclient is very basic ; it only has some basic library files and sqlplus binary (no tnsping , exp, imp,...etc). I think they are doing this for saving licence costs.
    Does oracle actually charge for Oracle Client installations ? If so, is there a significant cost difference between 'Administrator' type and 'Instaclient' type ?

    Max wrote:
    11.2/Solaris 10
    In my shop, we only install Oracle Client of type Instaclient (not the 'Administrator' type). Instaclient is very basic ; it only has some basic library files and sqlplus binary (no tnsping , exp, imp,...etc). I think they are doing this for saving licence costs.
    Does oracle actually charge for Oracle Client installations ? If so, is there a significant cost difference between 'Administrator' type and 'Instaclient' type ?no

  • Oracle Text, ctxsys.context problem with number column

    Hi,
    DB 11.2.0.3
    Is there any solution to create ctxsys.context index on number column ? Or I have to create other index type ?
    When I try do that (create ctxsys.context index), I get
    09:01:18  ORA-29855: wystąpił błąd przy wykonywaniu podprogramu ODCIINDEXCREATE  (An error has occurred in the performance of the subprogram)
    09:01:18  ORA-20000: Oracle Text - błąd: (- error:)
    09:01:18  DRG-10509: niepoprawna kolumna tekstowa: ITEM_TYPE (invalid text column:)
    09:01:18  ORA-06512: przy "CTXSYS.DRUE", linia 160
    09:01:18  ORA-06512: przy "CTXSYS.TEXTINDEXMETHODS", linia 366Btw, is there possible to search like "*LIKE %123%*" clause any of index (in contains) ?
    Edited by: Ndejo on 2012-11-21 00:53

    The multi_column_datastore says that the text to be indexed should be fetched from the supplied COLUMNS list rather than from the actual column the index is created on.
    So in this case we're fetching the contents of "theNumber" column, converting it to text, and indexing it.
    You don't necessarily need a dummy column, if "a_title" is a varchar column you could create the index on that instead.
    For example:
    SQL> create table mytab( a_id number, a_code number, a_title varchar2(80), a_subtitle varchar2(80), a_info clob );
    Table created.
    SQL> insert into mytab values ( 12, 9812376, 'foo is the title',
      2  'foobar is the subtitle', 'the info column will not be indexed' );
    1 row created.
    SQL> exec ctx_ddl.drop_preference( 'myds' )
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.create_preference( 'myds', 'MULTI_COLUMN_DATASTORE' )
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute( 'myds', 'COLUMNS', 'a_code, a_title, a_subtitle' )
    PL/SQL procedure successfully completed.
    SQL> create index myindex on mytab (a_title) indextype is ctxsys.context
      2  parameters ('datastore myds');
    Index created.
    SQL> select a_id from mytab where contains (a_title, '%123%') > 0;
          A_ID
            12
    SQL> select a_id from mytab where contains (a_title, 'foo') > 0;
          A_ID
            12If you want to be able to search within a particular column, then add "section group CTXSYS.AUTO_SECTION_GROUP" to the parameters clause, and you can then do:
    SQL> select a_id from mytab where contains (a_title, 'foobar WITHIN a_subtitle') > 0;
          A_ID
            12

  • Oracle Text -- ctxsys.context

    Hi
    We are creating a oracle text index on one table . The table contains 200 million records
    The script is failing in the middle by giving the error unable to extend temp segement by 128 in temp table space.
    Can you please provide any suggestions of how this issue can be rectified.
    Also Can we use nosort option with text indexes.
    Regards
    Ramakrishna

    Are you using automatic PGA work area sizing?
    You could switch to manual for this session and override sort_area_size.
    Also, memory parameters of index can be changed.
    See:
    http://download.oracle.com/docs/cd/E11882_01/text.112/e16594/aoptim.htm#i1006756

  • Installation of Oracle Text in Oracle 10g

    Hi All,
    Could you please help me in installing ORACLE TEXT in Oracle 10g. What exactly ils this feature and how I can install it.
    Regards
    Harpreet Singh

    You don't need the companion CD to install Oracle Text.
    Oracle Text is installed by default if you have created your database using DBCA.
    However, if your database has been installed manually you may need to install this feature additionally.
    In order to check if the feature is already present check if CTXSYS schema exists:
    SQL> select username
      2  from dba_users
      3  where username='CTXSYS';
    USERNAME
    CTXSYS
    SQL>Cheers,
    Mihajlo

  • Schema CTXSYS, MDSYS

    HI,
    I have a application which runs on mod_plsql procedural concept using WebDB as DAD.
    I have some schema's like "CTXSYS" AND "MDSYS" as part of the database.
    My Question, is it OK, if delete these schema's ?
    Thanks in advance.

    MDSYS provides the objects needed to run Oracle Spatial and Oracle Locator. CTXSYS provides the objects needed to run Oracle Text.
    Oracle Text and Oracle Locator are free with the database.
    Instead of deleting them, why not find out how you can cut the cost of your developer's code by using them effectively?
    If you really want to delete them, use the installer to remove the capabilities. Do NOT drop the schemas manually.

  • Error while running the Oracle Text optimize index procedure (even as a dba user too)

    Hi Experts,
    I am on Oracle on 11.2.0.2  on Linux. I have implemented Oracle Text. My Oracle Text indexes are fragmented but I am getting an error while running the optimize_index error. Following is the error:
    begin
      ctx_ddl.optimize_index(idx_name=>'ACCESS_T1',optlevel=>'FULL');
    end;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 941
    ORA-06512: at line 1
    Now I tried then to run this as DBA user too and it failed the same way!
    begin
      ctx_ddl.optimize_index(idx_name=>'BVSCH1.ACCESS_T1',optlevel=>'FULL');
    end;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 941
    ORA-06512: at line 1
    Now CTXAPP role is granted to my schema and still I am getting this error. I will be thankful for the suggestions.
    Also one other important observation: We have this issue ONLY in one database and in the other two databases, I don't see any problem at all.
    I am unable to figure out what the issue is with this one database!
    Thanks,
    OrauserN

    How about check the following?
    Bug 10626728 - CTX_DDL.optimize_index "full" fails with an empty ORA-20000 since 11.2.0.2 upgrade (DOCID 10626728.8)

  • Is Oracle Text the right solution for this need of a specific search!

    Hi ,
    We are on Oracle 11.2.0.2 on Solaris 10. We have the need to be able to do search on data that are having diacritical marks and we should be able to do the serach ignoring this diacritical marks. That is the requirement. Now I got to hear that Oracle Text has a preference called BASIC_LEXER which can bypass the diacritical marks and so solely due to this feature I implemented Oracle Text and just for this diacritical search and no other need.
    I mean I set up preference like this:
      ctxsys.ctx_ddl.create_preference ('cust_lexer', 'BASIC_LEXER');
      ctxsys.ctx_ddl.set_attribute ('cust_lexer', 'base_letter', 'YES'); -- removes diacritics
    With this I set up like this:
    CREATE TABLE TEXT_TEST
      NAME  VARCHAR2(255 BYTE)
    --created Oracle Text index
    CREATE INDEX TEXT_TEST_IDX1 ON TEXT_TEST
    (NAME)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('LEXER cust_lexer WORDLIST cust_wl SYNC (ON COMMIT)');
    --sample data to illustrate the problem
    Insert into TEXT_TEST
       (NAME)
    Values
       ('muller');
    Insert into TEXT_TEST
       (NAME)
    Values
       ('müller');
    Insert into TEXT_TEST
       (NAME)
    Values
       ('MULLER');
    Insert into TEXT_TEST
       (NAME)
    Values
       ('MÜLLER');
    Insert into TEXT_TEST
       (NAME)
    Values
       ('PAUL HERNANDEZ');
    Insert into TEXT_TEST
       (NAME)
    Values
       ('CHRISTOPHER Phil');
    COMMIT;
    --Now there is an alternative solution that is there,  instead of thee Oracle Text which is just a plain function given below (and it seems to work neat for my simple need of removing diacritical characters effect in search)
    --I need to evaluate which is better given my specific needs -the function below or Oracle Text.
    CREATE OR REPLACE FUNCTION remove_dia(p_value IN VARCHAR2, p_doUpper IN VARCHAR2 := 'Y')
    RETURN VARCHAR2 DETERMINISTIC
    IS
    OUTPUT_STR VARCHAR2(4000);
    begin
    IF (p_doUpper = 'Y') THEN
       OUTPUT_STR := UPPER(p_value);
    ELSE
       OUTPUT_STR := p_value;
    END IF;
    OUTPUT_STR := TRANSLATE(OUTPUT_STR,'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ', 'AAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
    RETURN (OUTPUT_STR);
    end;
    --now I query for which name stats with  a P%:
    --Below query gets me unexpected result of one row as I am using Oracle Text where each word is parsed for search using CONTAINS...
    SQL> select * from text_test where contains(name,'P%')>0;
    NAME
    PAUL HERNANDEZ
    CHRISTOPHER Phil
    --Below query gets me the right and expected result of one row...
    SQL> select * from text_test where name like 'P%';
    NAME
    PAUL HERNANDEZ
    --Below query gets me the right and expected result of one row...
    SQL>  select * from text_test where remove_dia(name) like remove_dia('P%');
    NAME
    PAUL HERNANDEZMy entire need was only to be able to do a search that bypasses diacritical characters. To implement Oracle Text for that reason, I am wondering if that was the right choice! More so when I am now finding that the functionality of LIKE is not available in Oracle Text - the Oracle text search are based on tokens or words and they are different from output of the LIKE operator. So may be should I have just used a simple function like below and used that for my purpose instead of using Oracle Text:
    This function (remove_dia) just removes the diacritical characters and may be for my need this is all that is needed. Can someone help to review that given my need I am better of not using Oracle Text? I need to continue using the functionality of Like operator and also need to bypass diacritical characters so the simple function that I have meets my need whereas Oracle Text causes a change in behaviour of search queries.
    Thanks,
    OrauserN

    If all you need is LIKE functionality and you do not need any of the complex search capabilities of Oracle Text, then I would not use Oracle Text. I would create a function-based index on your name column that uses your function that removes the diacritical marks, so that your searches will be faster. Please see the demonstration below.
    SCOTT@orcl_11gR2> CREATE TABLE TEXT_TEST
      2    (NAME  VARCHAR2(255 BYTE))
      3  /
    Table created.
    SCOTT@orcl_11gR2> Insert all
      2  into TEXT_TEST (NAME) Values ('muller')
      3  into TEXT_TEST (NAME) Values ('müller')
      4  into TEXT_TEST (NAME) Values ('MULLER')
      5  into TEXT_TEST (NAME) Values ('MÜLLER')
      6  into TEXT_TEST (NAME) Values ('PAUL HERNANDEZ')
      7  into TEXT_TEST (NAME) Values ('CHRISTOPHER Phil')
      8  select * from dual
      9  /
    6 rows created.
    SCOTT@orcl_11gR2> CREATE OR REPLACE FUNCTION remove_dia
      2    (p_value   IN VARCHAR2,
      3       p_doUpper IN VARCHAR2 := 'Y')
      4    RETURN VARCHAR2 DETERMINISTIC
      5  IS
      6    OUTPUT_STR VARCHAR2(4000);
      7  begin
      8    IF (p_doUpper = 'Y') THEN
      9        OUTPUT_STR := UPPER(p_value);
    10    ELSE
    11        OUTPUT_STR := p_value;
    12    END IF;
    13    RETURN
    14        TRANSLATE
    15          (OUTPUT_STR,
    16           'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ',
    17           'AAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
    18  end;
    19  /
    Function created.
    SCOTT@orcl_11gR2> show errors
    No errors.
    SCOTT@orcl_11gR2> CREATE INDEX text_test_remove_dia_name
      2  ON text_test (remove_dia (name))
      3  /
    Index created.
    SCOTT@orcl_11gR2> set autotrace on explain
    SCOTT@orcl_11gR2> select * from text_test
      2  where  remove_dia (name) like remove_dia ('mü%')
      3  /
    NAME
    muller
    müller
    MULLER
    MÜLLER
    4 rows selected.
    Execution Plan
    Plan hash value: 3139591283
    | Id  | Operation                   | Name                      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |                           |     1 |  2131 |     2   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| TEXT_TEST                 |     1 |  2131 |     2   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | TEXT_TEST_REMOVE_DIA_NAME |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("SCOTT"."REMOVE_DIA"("NAME") LIKE "REMOVE_DIA"('mü%'))
           filter("SCOTT"."REMOVE_DIA"("NAME") LIKE "REMOVE_DIA"('mü%'))
    Note
       - dynamic sampling used for this statement (level=2)
    SCOTT@orcl_11gR2> select * from text_test
      2  where  remove_dia (name) like remove_dia ('P%')
      3  /
    NAME
    PAUL HERNANDEZ
    1 row selected.
    Execution Plan
    Plan hash value: 3139591283
    | Id  | Operation                   | Name                      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |                           |     1 |  2131 |     2   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| TEXT_TEST                 |     1 |  2131 |     2   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | TEXT_TEST_REMOVE_DIA_NAME |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("SCOTT"."REMOVE_DIA"("NAME") LIKE "REMOVE_DIA"('P%'))
           filter("SCOTT"."REMOVE_DIA"("NAME") LIKE "REMOVE_DIA"('P%'))
    Note
       - dynamic sampling used for this statement (level=2)
    SCOTT@orcl_11gR2>

  • Product Search Using Oracle Text or By Any Other Methods using PL/SQL

    Hi All,
    I have requirement for product search using the product table which has around 5 million products. I Need to show top 100 disitnct products searched  in the following order
    1. = ProductDescription
    2. ProductDescription_%
    3. %_ProductDescription_%
    4. %_ProductDescription
    5. ProductDescription%
    6. %ProductDescription
    Where '_' is space.  If first two/three/or any criteria itslef gives me 100 records then i need not search for another patterns
    Table Structure Is as follows
    Create Table Tbl_Product_Lookup
        Barcode_number                Varchar2(9),
        Product_Description Varchar2(200),
        Product_Start_Date Date,
        Product_End_Date Date,
        Product_Price Number(12,4)
    Could you please help me implementing this one ? SLA for the search result is 2 seconds
    Thanks,
    Varun

    You could use an Oracle Text context index with a wordlist to speed up substring searches and return all rows that match any of your criteria, combined with a case statement to provide a ranking that can be ordered by within an inner query, then use rownum to limit the rows in an outer query.  You could also use the first_rows(n) hint to speed up the return of limited rows.  Please see the demonstration below.  If you decide to use Oracle Text, you may want to ask further questions in the Oracle Text sub-forum on this forum or space or whatever they call it now.
    SCOTT@orcl_11gR2> -- table:
    SCOTT@orcl_11gR2> Create Table Tbl_Product_Lookup
      2    (
      3       Barcode_number       Varchar2(9),
      4       Product_Description  Varchar2(200),
      5       Product_Start_Date   Date,
      6       Product_End_Date     Date,
      7       Product_Price          Number(12,4)
      8    )
      9  /
    Table created.
    SCOTT@orcl_11gR2> -- sample data:
    SCOTT@orcl_11gR2> insert all
      2  into tbl_product_lookup (product_description) values ('test product')
      3  into tbl_product_lookup (product_description) values ('test product and more')
      4  into tbl_product_lookup (product_description) values ('another test product and more')
      5  into tbl_product_lookup (product_description) values ('another test product')
      6  into tbl_product_lookup (product_description) values ('test products')
      7  into tbl_product_lookup (product_description) values ('selftest product')
      8  select * from dual
      9  /
    6 rows created.
    SCOTT@orcl_11gR2> insert into tbl_product_lookup (product_description) select object_name from all_objects
      2  /
    75046 rows created.
    SCOTT@orcl_11gR2> -- wordlist:
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference('mywordlist', 'BASIC_WORDLIST');
      3    ctx_ddl.set_attribute('mywordlist','PREFIX_INDEX','TRUE');
      4    ctx_ddl.set_attribute('mywordlist','PREFIX_MIN_LENGTH', '3');
      5    ctx_ddl.set_attribute('mywordlist','PREFIX_MAX_LENGTH', '4');
      6    ctx_ddl.set_attribute('mywordlist','SUBSTRING_INDEX', 'YES');
      7    ctx_ddl.set_attribute('mywordlist', 'wildcard_maxterms', 0) ;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- context index that uses wordlist:
    SCOTT@orcl_11gR2> create index prod_desc_text_idx
      2  on tbl_product_lookup (product_description)
      3  indextype is ctxsys.context
      4  parameters ('wordlist mywordlist')
      5  /
    Index created.
    SCOTT@orcl_11gR2> -- gather statistics:
    SCOTT@orcl_11gR2> exec dbms_stats.gather_table_stats (user, 'TBL_PRODUCT_LOOKUP')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- query:
    SCOTT@orcl_11gR2> variable productdescription varchar2(100)
    SCOTT@orcl_11gR2> exec :productdescription := 'test product'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> column product_description format a45
    SCOTT@orcl_11gR2> set autotrace on explain
    SCOTT@orcl_11gR2> set timing on
    SCOTT@orcl_11gR2> select /*+ FIRST_ROWS(100) */ *
      2  from   (select /*+ FIRST_ROWS(100) */ distinct
      3              case when product_description = :productdescription            then 1
      4               when product_description like :productdescription || ' %'       then 2
      5               when product_description like '% ' || :productdescription || ' %' then 3
      6               when product_description like '% ' || :productdescription       then 4
      7               when product_description like :productdescription || '%'       then 5
      8               when product_description like '%' || :productdescription       then 6
      9              end as ranking,
    10              product_description
    11           from   tbl_product_lookup
    12           where  contains (product_description, '%' || :productdescription || '%') > 0
    13           order  by ranking)
    14  where  rownum <= 100
    15  /
       RANKING PRODUCT_DESCRIPTION
             1 test product
             2 test product and more
             3 another test product and more
             4 another test product
             5 test products
             6 selftest product
    6 rows selected.
    Elapsed: 00:00:00.10
    Execution Plan
    Plan hash value: 459057338
    | Id  | Operation                      | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |                    |    38 |  3990 |    13  (16)| 00:00:01 |
    |*  1 |  COUNT STOPKEY                 |                    |       |       |            |          |
    |   2 |   VIEW                         |                    |    38 |  3990 |    13  (16)| 00:00:01 |
    |*  3 |    SORT UNIQUE STOPKEY         |                    |    38 |   988 |    12   (9)| 00:00:01 |
    |   4 |     TABLE ACCESS BY INDEX ROWID| TBL_PRODUCT_LOOKUP |    38 |   988 |    11   (0)| 00:00:01 |
    |*  5 |      DOMAIN INDEX              | PROD_DESC_TEXT_IDX |       |       |     4   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=100)
       3 - filter(ROWNUM<=100)
       5 - access("CTXSYS"."CONTAINS"("PRODUCT_DESCRIPTION",'%'||:PRODUCTDESCRIPTION||'%')>0)
    SCOTT@orcl_11gR2>

  • Need Help on Oracle text

    Hi Masters,
    I am working on Oracle Text. I have executed the below step/commands. All are executed successfully. But I didn't seen any improvement in my task. But I have one doubt, will explain below.
    create table ent_dnt as select * from entitlement_dnt;
    BEGIN
        CTX_DDL.CREATE_PREFERENCE ('oracletext_datastore', 'MULTI_COLUMN_DATASTORE');
        CTX_DDL.SET_ATTRIBUTE
          ('oracletext_datastore', 'COLUMNS',
            'ORDER_NUMBER, GENERIC_PRODUCT_NAME_EXT, ENTITLEMENT_REF_ID, DEVICE_ASSET_ID, DEVICE_UNIQUE_ID, SWSERVICETAG, PRODUCT_DESC');
    END;
    CREATE INDEX idx_oracle_text
       ON Ent_dnt (search_cols)
        INDEXTYPE IS CTXSYS.CONTEXT
      PARAMETERS ('DATASTORE  oracletext_datastore');
    BEGIN
    DBMS_STATS.GATHER_TABLE_STATS('EE', 'ent_DNT', cascade=>TRUE);
    DBMS_STATS.GATHER_TABLE_STATS('EE', 'upd_DNT', cascade=>TRUE);
    dbms_stats.gather_index_stats('EE', 'idx_oracle_text1');
    dbms_stats.gather_index_stats('EE', 'idx_oracle_text');
    END;
    the above steps are created / executed successfully. But when execute my select query..I didn't seen anywhere oracle text index name in my explain plan.
    Plan
    SELECT STATEMENT  ALL_ROWSCost: 28,393  Bytes: 49,675  Cardinality: 5 
      3 SORT AGGREGATE  Bytes: 8  Cardinality: 1 
      2 TABLE ACCESS BY INDEX ROWID TABLE EE.EE_PROD_GRP_ENTITLEMENT Cost: 4  Bytes: 8  Cardinality: 1 
      1 INDEX RANGE SCAN INDEX EE.IDX_PGE_ENT_ID Cost: 3  Cardinality: 1 
      5 SORT AGGREGATE  Bytes: 8  Cardinality: 1 
      4 TABLE ACCESS FULL TABLE EE.ENT_DNT Cost: 26,781  Bytes: 8  Cardinality: 1 
      20 VIEW EE. Cost: 28,393  Bytes: 49,675  Cardinality: 5 
      19 COUNT STOPKEY 
      18 VIEW EE. Cost: 28,393  Bytes: 49,610  Cardinality: 5 
      17 SORT GROUP BY STOPKEY  Cost: 28,393  Bytes: 2,295  Cardinality: 5 
      16 HASH JOIN OUTER  Cost: 28,392  Bytes: 2,295  Cardinality: 5 
      14 NESTED LOOPS OUTER  Cost: 28,388  Bytes: 1,808  Cardinality: 4 
      11 NESTED LOOPS OUTER  Cost: 28,384  Bytes: 1,600  Cardinality: 4 
      8 HASH JOIN  Cost: 28,383  Bytes: 1,552  Cardinality: 4 
      6 TABLE ACCESS FULL TABLE EE.UPD_DNT Cost: 1,089  Bytes: 174  Cardinality: 6 
      7 TABLE ACCESS FULL TABLE EE.ENT_DNT Cost: 27,292  Bytes: 110,648,108  Cardinality: 308,212 
      10 TABLE ACCESS BY INDEX ROWID TABLE EE.PRODUCT_LICENSE_PART Cost: 1  Bytes: 12  Cardinality: 1 
      9 INDEX RANGE SCAN INDEX EE.IDX_PLP_PD_DATA_ID Cost: 0  Cardinality: 1 
      13 TABLE ACCESS BY INDEX ROWID TABLE EE.PD_KT_DETAILS Cost: 1  Bytes: 52  Cardinality: 1 
      12 INDEX RANGE SCAN INDEX EE.IDX_PKD_PART_NUM Cost: 0  Cardinality: 1 
      15 TABLE ACCESS FULL TABLE EE.LEGACY_CONFIG Cost: 3  Bytes: 35  Cardinality: 5 
    and cost is also so high. But when I ran the below query. I didn't see any $ tables.
    TEST@orcl_11gR2> SELECT object_name, object_type
      2  FROM   user_objects
      3  WHERE  object_name LIKE '%oracle%'
      4  /
    Usually DR$ $I, $K,$N,$R,$X tables are not creaed. where is the problem? please help me. I have to complete this task.
    Regards
    AR

    Hi Roger,
    Thanks alot for your reply. This is my query. Yes I didn't used contain clause in my query. But i don't know how to use.
    SELECT B.*,
           CASE WHEN ISBOUND = 'Y' AND ALLOWRESEND = 'Y' THEN 'Y' ELSE 'N' END
              AS Allowunbind,
           CASE
              WHEN ISBOUND = 'Y' AND IsThisAnUpgrade = 'N' AND Allowresend = 'N'
              THEN
                 'Y'
              ELSE
                 CASE
                    WHEN     ISBOUND = 'N'
                         AND BINDING_TYPE = INITCAP ('TRUSTED')
                         AND ALLOWRESEND = 'N'
                    THEN
                       'Y'
                    ELSE
                       'N'
                 END
           END
              AS AllowBind,
           FNC_GET_GROUPNAME_V3 (B.ENTITLEMENT_ID) GROUP_NAME,
           FNC_GET_USERGROUPNAME_V3 (B.ENTITLEMENT_ID, '[email protected]')
              USER_GROUP_NAME,
           FNC_GET_ROLE_V3 (B.ENTITLEMENT_ID, '[email protected]') ROLE_NAME,
           (SELECT MAX (PGE_IS_ASSIGNED)
              FROM ENT_DNT
             WHERE ENTITLEMENT_ID = B.ENTITLEMENT_ID)
              AS IS_ASSIGNED
      FROM (SELECT *
              FROM (SELECT A.*, ROWNUM RNUM
                      FROM (SELECT *
                              FROM (SELECT *
                                      FROM (SELECT DISTINCT
                                                   ENTDNT.ORDER_DATE,
                                                   ENTDNT.ORDER_NUMBER,
                                                   ENTDNT.ENTITLEMENT_ID,
                                                   ENTDNT.ENTITLEMENT_REF_ID,
                                                   ENTDNT.CUSTOMER_NUM,
                                                   ENTDNT.ENTITLEMENT_STATUS_ID,
                                                   ENTDNT.ENT_QTY,
                                                   ENTDNT.ENTITLEMENTNAME,
                                                   ENTDNT.ACT_KEY_LOB_ID,
                                                   ENTDNT.LIC_KEY_LOB_ID,
                                                   ENTDNT.LICENSE_KEY,
                                                   ENTDNT.ENT_TYPE_ID,
                                                   ENTDNT.PRODUCT_DATA_ID,
                                                   ENTDNT.PRODUCT_NAME,
                                                   ENTDNT.TYPE_DIMENSION_EXT,
                                                   ENTDNT.BINDING_TYPE,
                                                   DECODE (
                                                      ENTDNT.ENT_TYPE_ID,
                                                      1, ENTDNT.PRODUCT_DESC,
                                                      3, ENTDNT.GENERIC_PRODUCT_NAME_EXT)
                                                      AS PRODUCT_DESC,
                                                   DECODE (
                                                      ENTDNT.ENT_TYPE_ID,
                                                      3, PKD.PRIMARY_LICENSE_IDENTIFIER,
                                                      2, 'SOFTWARE_SERVICETAG',
                                                      1, 'ENTITLEMENTID',
                                                      NULL)
                                                      AS PRIMARYLICENSEIDENTIFIER,
                                                   CASE
                                                      WHEN     DECODE (
                                                                 ENTDNT.ENT_TYPE_ID,
                                                                  3, DECODE (
                                                                        PKD.KEY_SOURCE_TYPE,
                                                                        'SOURCE_NO_KEY', 'N',
                                                                        'Y'),
                                                                  1, 'Y',
                                                                  LC.IS_KEY_REQUIRED) =
                                                                  'Y'
                                                           AND ENTDNT.ENTITLEMENT_STATUS_ID =
                                                                  '0'
                                                           AND (   ENTDNT.LIC_KEY_LOB_ID
                                                                      IS NOT NULL
                                                                OR ENTDNT.LICENSE_KEY
                                                                      IS NOT NULL
                                                                OR ENTDNT.ACT_KEY_LOB_ID
                                                                      IS NOT NULL)
                                                      THEN
                                                         'Y'
                                                      WHEN     ENTDNT.ENTITLEMENT_STATUS_ID =
                                                                  '0'
                                                           AND (   ENTDNT.LIC_KEY_LOB_ID
                                                                      IS NOT NULL
                                                                OR ENTDNT.LICENSE_KEY
                                                                      IS NOT NULL)
                                                      THEN
                                                         'Y'
                                                      ELSE
                                                         'N'
                                                   END
                                                      AS KEYREQUIRED,
                                                   ENTDNT.ISTHISANUPGRADE,
                                                   ENTDNT.DEVICE_ASSET_ID,
                                                   ENTDNT.SWSERVICETAG,
                                                   PKD.PHVALUE,
                                                   CASE
                                                      WHEN -- ENTDNT.BINDING_TYPE = 'Trusted'
                                                          ENTDNT.BINDING_TYPE =
                                                              INITCAP ('TRUSTED')
                                                      THEN
                                                         'N'
                                                      WHEN    ENTDNT.BINDING_TYPE =
                                                                 INITCAP (
                                                                    'COMPONENT')
                                                           -- OR ENTDNT.BINDING_TYPE = 'DeviceID'
                                                           OR ENTDNT.BINDING_TYPE =
                                                                 INITCAP (
                                                                    'DEVICEID')
                                                           --OR ENTDNT.BINDING_TYPE = 'ServiceTag'
                                                           OR ENTDNT.BINDING_TYPE =
                                                                 INITCAP (
                                                                    'SERVICETAG')
                                                      THEN
                                                         'Y'
                                                      ELSE
                                                         'N'
                                                   END
                                                      AS ISBOUND,
                                                   CASE
                                                      WHEN     ENTDNT.ENT_TYPE_ID =
                                                                  3
                                                           AND PKD.ALLOW_RESEND =
                                                                  'Y'
                                                           AND ENTDNT.ENTITLEMENT_STATUS_ID =
                                                                  '0'
                                                           AND (   ENTDNT.LIC_KEY_LOB_ID
                                                                      IS NOT NULL
                                                                OR ENTDNT.LICENSE_KEY
                                                                      IS NOT NULL
                                                                OR ENTDNT.ACT_KEY_LOB_ID
                                                                      IS NOT NULL)
                                                      THEN
                                                         'Y'
                                                      WHEN     ENTDNT.ENTITLEMENT_STATUS_ID =
                                                                  '0'
                                                           AND (   ENTDNT.LIC_KEY_LOB_ID
                                                                      IS NOT NULL
                                                                OR ENTDNT.LICENSE_KEY
                                                                      IS NOT NULL)
                                                      THEN
                                                         'Y'
                                                      ELSE
                                                         'N'
                                                   END
                                                      AS ALLOWRESEND,
                                                   ENTDNT.GENERIC_PRODUCT_NAME_EXT,
                                                   PLP.LICENSE_PART_NUMBER
                                                      AS SRVPARTNUMBER,
                                                   ENTDNT.DEVICE_UNIQUE_ID,
                                                   (SELECT MAX (IS_ASSIGNED)
                                                      FROM EE_PROD_GRP_ENTITLEMENT PGE
                                                     WHERE ENTITLEMENT_ID =
                                                              ENTDNT.ENTITLEMENT_ID)
                                                      AS IS_ASSIGNED,
                                                   ENTDNT.SINGLEFILEPERID
                                              FROM ent_dnt ENTDNT,
                                                   PD_KT_DETAILS PKD,
                                                   PRODUCT_LICENSE_PART PLP,
                                                   Legacy_Config LC,
                                                   upd_dnt UPDNT
                                             WHERE     ENTDNT.PRODUCT_GROUP_ID =
                                                          UPDNT.PRODUCT_GROUP_ID
                                                   AND UPDNT.EMAIL_ADDRESS =
                                                          '[email protected]'
                                                   AND ENTDNT.ENT_TYPE_ID =
                                                          LC.ENTITLEMENT_TYPE_ID(+)
                                                   AND PLP.PRODUCT_DATA_ID(+) =
                                                          ENTDNT.PRODUCT_DATA_ID
                                                   AND PKD.PART_NUMBER(+) =
                                                          ENTDNT.LIC_PART_NUM
                                                   AND UPDNT.IS_DELETED = 'N'
                                                   AND ENTDNT.ENTITLEMENT_STATUS_ID IN
                                                          (0, 4)
                                                   AND ENTDNT.IS_DELETED = 'N')
                                     WHERE    (UPPER (GENERIC_PRODUCT_NAME_EXT) LIKE
                                                  '%IDRAC%')
                                           OR (ORDER_NUMBER LIKE '%251608469%')
                                           OR (ENTITLEMENT_REF_ID LIKE '%162523200%')
                                           OR (DEVICE_ASSET_ID LIKE '%162523200%')
                                           OR (DEVICE_UNIQUE_ID LIKE '%162523200%')
                                           OR (SWSERVICETAG LIKE '%162523200%')
                                           OR (UPPER (PRODUCT_DESC) LIKE
                                                  '%162523200%'))
                             WHERE    (UPPER (GENERIC_PRODUCT_NAME_EXT) LIKE
                                          '%575757%')
                                   OR (ORDER_NUMBER LIKE '%251608469%')
                                   OR (ENTITLEMENT_REF_ID LIKE '%162523200%')
                                   OR (DEVICE_ASSET_ID LIKE '%162523200%')
                                   OR (DEVICE_UNIQUE_ID LIKE '%162523200%')
                                   OR (SWSERVICETAG LIKE '%162523200%')
                                   OR (UPPER (PRODUCT_DESC) LIKE '%162523200%')) A
                     WHERE ROWNUM <= 100)
             WHERE RNUM >= 1) B;
    yes..you are 100% correct. I did mistake with like operator. now I executed the below query. displaying all oracle related tables and indexes. Thank you.
    SELECT object_name, object_type
    FROM   user_objects
    WHERE  object_name LIKE '%ORACLE%'
    but here I have a problem. how can i run the below select for my above query?
    SELECT *
      2  FROM  Entitlement_dnt
      3  WHERE  CONTAINS (search_cols, REPLACE (:i_OpenSearchText, ',', ' AND ')) > 0
    here what can I do the value for :I_opensearchText ? confused.
    please help me..!!
    Regards
    AR

Maybe you are looking for

  • Frozen Phone

    My iphone is frozen on a white screen and will not let me exit.  I have tried holding the power button and it will not let me turn it off, and i have hit the home button but that will not work either.  I can still change my volume, screen shot, and h

  • WatchedFolder endpoint

    Has anyone tried to set a watchedfolder endpoint on another server with a path like this: \\otherServer\input or E:\input (with E being an attached network drive) Thanks for your help. Serge

  • Opening CS4 fIles on a second monitor, the way it worked in CS3.

    This drove me nuts for well over a year. I guess this is a "tip" of sorts for dual monitor users who recently switched from CS3 to CS4 and expect files to open on the 2nd monitor. With the advent of CS4, the ability to automatically open a few dozen

  • HT1216 copy-pasting text in Unix

    Hello.  I am trying to do shift-insert to paste text from clip board.  Since insert can be emulated using fn-return on a mac keyboard, I do shift-fn-return.  But nothing happens.  I'm doing this in a VNC session.  Any ideas?  Is my problem that the s

  • How to populate a Drop Down List?

    Hello all, im having trouble populating my dropdown list... i would like to populate it using records from BOOK_INFO.BOOK_CN feild in my database..... could some one give me simple step -by -step instructions as to how i would achive this.... im usin