"Oracle text" performance Problem

Architecture for Performance on a web site Search!
I wanna use text service of ORACLE.But I am worried about the performance ....
How should I design the system if I want the best perfomance and scalability ?
1.Should I build a seperate coloumn in my every table and merge all the information into one coloumn and full text index that column.
2.Put a full text index in all column in the table and use OR clause and reverse rank it for AND clause,using CONTAINSTABLE function.
3.Make a different table and put ID,TYPE and _VALUE fields and search in that table with less coloumns.
4.Seperate the full text database and search in a seperate db so that I can scale better?
did anybody have a similiar problem ? Any books on full text search ?

The number of indexes is irrelevant as such. If you really need 100 tables and you really need full text search on all of them, you need 100 indexes. When you are inserting data in any given table, the fact that there are 99 other tables with 99 other Text indexes is irrelevant.
That being said, I would seriously question whether a data model that involves doing full-text searches on 100 separate tables was actually a proper data model. That strikes me as highly unlikely.
Justin

Similar Messages

  • Oracle text performance with context search indexes

    Search performance using context index.
    We are intending to move our search engine to a new one based on Oracle Text, but we are meeting some
    bad performance issues when using search.
    Our application allows the user to search stored documents by name, object identifier and annotations(formerly set on objects).
    For example, suppose I want to find a document named ImportSax2.c: according to user set parameters, our search engine format the following
    search queries :
    1) If the user explicitely ask for a search by document name, the query is the following one =>
         select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0;
    2) If the user don't specify any extra parameters, the query is the following one =>
         select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c' , 1 ) > 0;
    Oracle text only need around 7 seconds to answer the second query, whereas it need around 50 seconds to give an answer for the first query.
    Here is a part of the sql script used for creating the Oracle Text index on the column OBJFIELDURL
    (this column stores a path to an xml file containing properties that have to be indexed for each object) :
    begin
    Ctx_Ddl.Create_Preference('wildcard_pref', 'BASIC_WORDLIST');
    ctx_ddl.set_attribute('wildcard_pref', 'wildcard_maxterms', 200) ;
    ctx_ddl.set_attribute('wildcard_pref','prefix_min_length',3);
    ctx_ddl.set_attribute('wildcard_pref','prefix_max_length',6);
    ctx_ddl.set_attribute('wildcard_pref','STEMMER','AUTO');
    ctx_ddl.set_attribute('wildcard_pref','fuzzy_match','AUTO');
    ctx_ddl.set_attribute('wildcard_pref','prefix_index','TRUE');
    ctx_ddl.set_attribute('wildcard_pref','substring_index','TRUE');
    end;
    begin
    ctx_ddl.create_preference('doc_lexer_perigee', 'BASIC_LEXER');
    ctx_ddl.set_attribute('doc_lexer_perigee', 'printjoins', '_-');
    ctx_ddl.set_attribute('doc_lexer_perigee', 'BASE_LETTER', 'YES');
    ctx_ddl.set_attribute('doc_lexer_perigee','index_themes','yes');
    ctx_ddl.create_preference('english_lexer','basic_lexer');
    ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    ctx_ddl.set_attribute('english_lexer','theme_language','english');
    ctx_ddl.set_attribute('english_lexer', 'printjoins', '_-');
    ctx_ddl.set_attribute('english_lexer', 'BASE_LETTER', 'YES');
    ctx_ddl.create_preference('german_lexer','basic_lexer');
    ctx_ddl.set_attribute('german_lexer','composite','german');
    ctx_ddl.set_attribute('german_lexer','alternate_spelling','GERMAN');
    ctx_ddl.set_attribute('german_lexer','printjoins', '_-');
    ctx_ddl.set_attribute('german_lexer', 'BASE_LETTER', 'YES');
    ctx_ddl.set_attribute('german_lexer','NEW_GERMAN_SPELLING','YES');
    ctx_ddl.set_attribute('german_lexer','OVERRIDE_BASE_LETTER','TRUE');
    ctx_ddl.create_preference('japanese_lexer','JAPANESE_LEXER');
    ctx_ddl.create_preference('global_lexer', 'multi_lexer');
    ctx_ddl.add_sub_lexer('global_lexer','default','doc_lexer_perigee');
    ctx_ddl.add_sub_lexer('global_lexer','german','german_lexer','ger');
    ctx_ddl.add_sub_lexer('global_lexer','japanese','japanese_lexer','jpn');
    ctx_ddl.add_sub_lexer('global_lexer','english','english_lexer','en');
    end;
    begin
         ctx_ddl.create_section_group('axmlgroup', 'AUTO_SECTION_GROUP');
    end;
    drop index ADSOBJ_XOBJFIELDURL force;
    create index ADSOBJ_XOBJFIELDURL on ADSOBJ(OBJFIELDURL) indextype is ctxsys.context
    parameters
    ('datastore ctxsys.file_datastore
    filter ctxsys.inso_filter
    sync (on commit)
    lexer global_lexer
    language column OBJFIELDURLLANG
    charset column OBJFIELDURLCHARSET
    format column OBJFIELDURLFORMAT
    section group axmlgroup
    Wordlist wildcard_pref
    Oracle created a table named DR$ADSOBJ_XOBJFIELDURL$I which now contains around 25 millions records.
    ADSOBJ is the table contaings information for our documents,OBJFIELDURL is the field that contains the path to the xml file containing
    data to index. That file looks like this :
    <?xml version="1.0" encoding="UTF-8" ?>
    <fields>
    <OBJNAME><![CDATA[NomLnk_177527o.jpgp]]></OBJNAME>
    <OBJREM><![CDATA[Z_CARACT_141]]></OBJREM>
    <OBJID>295926o.jpgp</OBJID>
    </fields>
    Can someone tell me how I can make that kind of request
    "select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0;"
    run faster ?

    Below are the execution plan for both the 2 requests :
    select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0
    PLAN_TABLE_OUTPUT
    |     Id     | Operation                              |Name                         |Rows     |Bytes     |Cost (%CPU)|
    |     0     | SELECT STATEMENT                    |                              |1272     |119K     |     4     (0)     |
    |     1      | TABLE ACCESS BY INDEX ROWID     |ADSOBJ      |1272     |119K     |     4     (0)     |
    |     2      |     DOMAIN INDEX                    |ADSOBJ_XOBJFIELDURL     |          |          |     4     (0)     |
    Note
    - 'PLAN_TABLE' is old version
    Executed in 2 seconds
    select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c' , 1 ) > 0
    PLAN_TABLE_OUTPUT
    |     Id     |Operation                              |Name                         |Rows     |Bytes     |Cost (%CPU)|
    |     0     | SELECT STATEMENT                    |                              |1272     |119K     |     4     (0)     |
    |     1     | TABLE ACCESS BY INDEX ROWID     |ADSOBJ                         |1272     |119K     |     4     (0)     |
    |     2     | DOMAIN INDEX                    |ADSOBJ_XOBJFIELDURL     |          |          |     4     (0)     |
    Sorry for the result formatting, I can't get it "easily" readable :(

  • Oracle 10G performance problems

    Hello,
    we have a lot of performance problems with oracle 10G. Especially tables scan on DRAW or AEN1 have long response times. It seems that the CBO uses the wrong strategy. The latest merge fix is already installed. Any idea to solve the problem is welcome.
    Best regards
    Juergen Remmert

    We had similar performance issues in our environment, once we upgraded from 9.2.0.2 to 10.2.0.2.
    Oracle: 10.2.0.2
    SAP: 4.7x110
    OS: SOLARIS 9 64bit
    The above mentioned notes were very helpful. We had to install an oracle patch as well (found on marketplace)  --  6321245
    and make the following oracle parameters changes:
    pga_aggregate_target - 144MB (default = 25MB)
    *.event="10027 trace name context forever, level 1"
    *.event="10028 trace name context forever, level 1"
    *.event="10162 trace name context forever, level 1"
    *.event="10183 trace name context forever, level 1"
    *.event="10191 trace name context forever, level 1"
    *.event="10629 trace name context forever, level 32"
    *.event="38068 trace name context forever, level 100"
    *.event="38043 trace name context forever, level 1"
    *.optimizer_index_caching=50
    *.optimizer_index_cost_adj=20
    *.parallel_execution_message_size=16384
    *._b_tree_bitmap_plans=FALSE
    *._index_join_enabled=FALSE
    *._optim_peek_user_binds=FALSE
    *._optimizer_mjc_enabled=FALSE
    *._sort_elimination_cost_ratio=10
    Remove
    *.optimizer_features_enable='9.2.0'
    HTH

  • Regular expression vs oracle text performance

    Does anyone have experience with comparig performance of regular expression vs oracle text?
    We need to implement a text search on a large volume table, 100K-500K rows.
    The select stmt will select from a VL, a view joining 2 tables, B and _TL.
    We need to search 2 text columns from this _VL view.
    Using regex seems less complex, but the deciding factor is of course performace.
    Would oracle text search perform better than regular expression in general?
    Thanks,
    Margaret

    Hi Dominc,
    Thanks, we'll try both...
    Would you be able to validate our code to create the multi-table index:
    CREATE OR REPLACE PACKAGE requirements_util AS
    PROCEDURE concat_columns(i_rowid IN ROWID, io_text IN OUT NOCOPY VARCHAR2);
    END requirements_util;
    CREATE OR REPLACE PACKAGE BODY requirements_util AS
    PROCEDURE concat_columns(i_rowid IN ROWID, io_text IN OUT NOCOPY VARCHAR2)
    AS
    tl_req pjt_requirements_tl%ROWTYPE;
    b_req pjt_requirements_b%ROWTYPE;
    CURSOR cur_req_name (i_rqmt_id IN pjt_requirements_tl.rqmt_id%TYPE) IS
    SELECT rqmt_name FROM pjt_requirements_tl
    WHERE rqmt_id = i_rqmt_id;
    PROCEDURE add_piece(i_add_str IN VARCHAR2) IS
    lx_too_big EXCEPTION;
    PRAGMA EXCEPTION_INIT(lx_too_big, -6502);
    BEGIN
    io_text := io_text||' '||i_add_str;
    EXCEPTION WHEN lx_too_big THEN NULL; -- silently don't add the string.
    END add_piece;
    BEGIN
         BEGIN
              SELECT * INTO b_req FROM pjt_requirements_b WHERE ROWID = i_rowid;
              EXCEPTION
              WHEN NO DATA_FOUND THEN
              RETURN;
         END;
         add_piece(b_req.req_code);
         FOR tl_req IN cur_req_name(b_req.rqmt_id) LOOP
         add_piece(tl_req.rqmt_name);
    END concat_columns;
    END requirements_util;
    EXEC ctx_ddl.drop_section_group('rqmt_sectioner');
    EXEC ctx_ddl.drop_preference('rqmt_user_ds');
    BEGIN
    ctx_ddl.create_preference('rqmt_user_ds', 'USER_DATASTORE');
    ctx_ddl.set_attribute('rqmt_user_ds', 'procedure', sys_context('userenv','current_schema')||'.'||'requirements_util.concat_columns');
    ctx_ddl.set_attribute('rqmt_user_ds', 'output_type', 'VARCHAR2');
    END;
    CREATE INDEX rqmt_cidx ON pjt_requirements_b(req_code)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('DATASTORE rqmt_user_ds
    SYNC (ON COMMIT)');

  • Oracle Text Search Problem

    hi,
    we have implemented oracle text search. When trying to search a keyword contains in Adobe Reader 7.0 pdf version no search result is showing while the same keyword search is showing the pdf file which is in Adobe Reader 6.0.
    Can any one please help with the way out?
    Oracle Version:Oracle10g(Release 2)
    //saby

    usually this sort of thing occurs when the filters that you are using predate the release of acrobat involved. I don't know for sure the dates on your particular versions - and indeed you don't give us the db patch level - but a metalink search should reveal this.
    Niall Litchfield

  • Oracle Text performance -- failed attempts

    We are trying to implement a simple search of text data stored in a heavily used table (inserts/updates). There are 3 columns to index --
    Headline (varchar2(255))
    Subheadline (varchar2(255))
    Teaser (varchar2(4000))
    The first attempt to implement Oracle text w/ CATSEARCH
    begin
    ctx_ddl.create_index_set('cms_iset');
    ctx_ddl.add_index('cms_iset','poolid_cp, mediaid_cp'); /* sub-index A */
    end;
    ---- We knew we were going to filter on poolid_cp and mediaid_cp ---
    CREATE INDEX cms_headlineidx ON con_properties (headline)
    INDEXTYPE IS ctxsys.CTXCAT
    PARAMETERS ('index set cms_iset');
    CREATE INDEX cms_subheadlineidx ON con_properties (subheadline)
    INDEXTYPE IS ctxsys.CTXCAT
    PARAMETERS ('index set cms_iset');
    CREATE INDEX cms_teaseridx ON con_properties (teaser)
    INDEXTYPE IS ctxsys.CTXCAT
    PARAMETERS ('index set cms_iset');
    *********THE RESULTS*************
    Our application server would spin up threads that would appear to be hanging. The load on the DB servers (RAC) were higher than normal. This implementation would have saved on having to do resync's manually.
    The next attempt was implementing w/ CONTEXT:
    alter table con_properties add (dummy varchar2(1));
    begin
    ctx_ddl.create_preference('con_propsearch', 'MULTI_COLUMN_DATASTORE');
    ctx_ddl.set_attribute('con_propsearch', 'columns', 'headline,subheadline,teaser');
    end;
    CREATE INDEX con_properties_searchidx
    ON con_properties(dummy)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('datastore CTXSYS.con_propsearch')
    Records getting put into the ctx_user_pending table a few hundred per hour.
    ********THE RESULTS*************
    Same issue with the application servers spinning off threads that seem to be hung. Spikey load on the DB servers (RAC).
    NOTE: In both implementations, running search querys ran OK. However, dropping the text index in BOTH cases caused the application servers to behave normally.
    Can anyone tell me what's going on internally with Oracle TEXT when a table is heavily inserted and updated? What is going on in the background. Is there some sort of lock that the app servers are waiting on? I know there is "overhead" with inserts on a normal b-tree index. Is it "exponential" with Oracle Text?
    Thank you!

    When documents in the base table are inserted, updated, or deleted, their ROWIDs are held in a DML queue until you synchronize the index. You can view this queue with the CTX_USER_PENDING view. Apparently, you are not synchronizing your context index, so the queue is building infinitely. You need to establish some method of synchronizing your index. You can use parameters('sync(on commit)') in your index creation or create an after insert or update statement level trigger, not row trigger, that uses dbms_job.submit to schedule ctx_ddl.sync_index to synchronize the index upon commit of the dml or you can manually run ctx_ddl.sync_index periodically or schedule it or you can alter and rebuild your index periodically or you can drop and recreate it periodically. Which method you choose depends on how current the information that you query needs to be. If your data needs to be current up to the moment, the you should sync on commit. Otherwise it may be better to do it in periodic batches.

  • Oracle Text indexation problem

    Hello all,
    we recently migrate one of our database from oracle 10.2.0.2 to an Oracle 10.2.0.4, and since then, Oracle Text indexer engine is unable to work properly.
    Indexing datas systematically result in the following error :
    DRG-50857: oracle error in dreii0fsh
    ORA-06550: line 1, column 106:
    PLS-00302: component 'S_MODE' must be declared
    ORA-06550: line 1, column 10:
    PL/SQL: Statement ignored
    Note that datas that were indexed with the previous version of Oracle can still be found with "Select... where contains...", though new datas can't be indexed at all.
    Can anybody help me with this issue ?
    Edited by: methos on 11 mai 2010 06:59

    See on metalink:
    'DRG-50857: oracle error in dreii0fsh' when creating TEXT index [ID 750898.1]
    It seems you upgraded the binaries,but not Oracle Text itself.
    Werner

  • Oracle Text starting problem

    Hello,
    I'm a newbie to Oracle 9i. I have recently installed it on Fedora Core3.
    I would be very thankful if any one just provide the pointers to start on from oracle text.
    Thanks in Advance..

    First place to start is:
    http://download-west.oracle.com/docs/cd/B19306_01/text.102/b14217/toc.htm
    The basics are in the first few chapters.
    Thanks,
    Ron

  • Oracle text performance

    hi all.
    i have useing orcle text for the indexing purposes ..
    the below query goes for an wildcard search and it performance is very poor ..
    /* Formatted on 2009/08/11 16:06 (Formatter Plus v4.8.5) */
    SELECT *
      FROM (SELECT z.*, ROWNUM r
              FROM (SELECT   *
                        FROM (SELECT *
                                FROM (SELECT score (1) score,
                                             SUBSTR (note, 1, 200) note, tmplt_id,
                                             appl_name, appl_use, appl_reference,
                                             appl_entity, effctv_start_date,
                                             effctv_end_date, eq_name, note_id,
                                             Bfcommon.getvaluebasedontemplate
                                                                 (tmplt_id,
                                                                  note_id
                                                                 ) VALUE,
                                             (SELECT em_name
                                                FROM ip_eq
                                               WHERE eq_name = a.eq_name) em_name,
                                             Bfcommon.is_edit_allowed_note1
                                                       (a.note_id,
                                                        'PACRIM1\E317329',
                                                        SYSDATE,
                                                        SYSDATE
                                                       ) LOCKED
                                        FROM bf_note a
                                       WHERE tmplt_id NOT IN (19, 14, 16)
                                         AND effctv_start_date >=
                                                TO_DATE ('08/12/2008 00:00:00',
                                                         'MM/DD/YYYY HH24:MI:SS'
                                         AND (   effctv_end_date <=
                                                    TO_DATE
                                                          ('08/12/2009 00:00:00',
                                                           'MM/DD/YYYY HH24:MI:SS'
                                              OR effctv_end_date IS NULL
                                         AND contains (note, '%test%', 1) > 0) r
                              UNION
                              SELECT score (1) score, SUBSTR (note, 1, 200) note,
                                     tmplt_id, appl_name, appl_use,
                                     appl_reference, appl_entity,
                                     effctv_start_date, effctv_end_date, eq_name,
                                     a.note_id, b.trgt_name VALUE,
                                     (SELECT em_name
                                        FROM ip_eq
                                       WHERE eq_name = a.eq_name) em_name,
                                     Bfcommon.is_edit_allowed_note1
                                                       (a.note_id,
                                                        'PACRIM1\E317329',
                                                        SYSDATE,
                                                        SYSDATE
                                                       ) LOCKED
                                FROM bf_note a, om_limit_hist b
                               WHERE (   date_changed =
                                            (SELECT MAX (date_changed)
                                               FROM om_limit_hist h1
                                              WHERE date_changed <
                                                       (SELECT MAX (date_changed)
                                                          FROM om_limit_hist h2
                                                         WHERE h2.trgt_name =
                                                                       b.trgt_name)
                                                AND h1.trgt_name = b.trgt_name)
                                      OR date_changed =
                                               (SELECT MAX (date_changed)
                                                  FROM om_limit_hist h1
                                                 WHERE h1.trgt_name = b.trgt_name)
                                 AND b.note_id = a.note_id(+)
                                 AND tmplt_id = 19
                                 AND effctv_start_date >=
                                        TO_DATE ('08/12/2008 00:00:00',
                                                 'MM/DD/YYYY HH24:MI:SS'
                                 AND (   effctv_end_date <=
                                            TO_DATE ('08/12/2009 00:00:00',
                                                     'MM/DD/YYYY HH24:MI:SS'
                                      OR effctv_end_date IS NULL
                                 AND contains (note, '%test%', 1) > 0)
                    ORDER BY 1 DESC) z
             WHERE ROWNUM <= 50)
    WHERE r >= 1here it goes for the wild card search for the string test ...Plz tell me how to index it in this case ..
    and its plan is
    Execution Plan
    Plan hash value: 3535478881
    | Id  | Operation                            | Name                | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                     |                     |    50 |   128K|       |   632   (1)| 00:00:08 |
    |*  1 |  VIEW                                |                     |    50 |   128K|       |   632   (1)| 00:00:08 |
    |*  2 |   COUNT STOPKEY                      |                     |       |       |       |         |     |
    |   3 |    VIEW                              |                     |    69 |   177K|       |   632   (1)| 00:00:08 |
    |*  4 |     SORT ORDER BY STOPKEY            |                     |    69 |   177K|   376K|   632   (1)| 00:00:08 |
    |   5 |      VIEW                            |                     |    69 |   177K|       |   590   (1)| 00:00:08 |
    |   6 |       SORT UNIQUE                    |                     |    69 |  7281 |       |   590   (2)| 00:00:08 |
    |   7 |        UNION-ALL                     |                     |       |       |       |         |     |
    |*  8 |         TABLE ACCESS BY INDEX ROWID  | BF_NOTE             |    68 |  7140 |       |   585   (1)| 00:00:08 |
    |*  9 |          DOMAIN INDEX                | BF_NOTE_TEXT_SEARCH |       |       |       |   221   (0)| 00:00:03 |
    |* 10 |         FILTER                       |                     |       |       |       |         |     |
    |  11 |          NESTED LOOPS                |                     |     1 |   141 |       |     3   (0)| 00:00:01 |
    |  12 |           TABLE ACCESS FULL          | OM_LIMIT_HIST       |     1 |    36 |       |     2   (0)| 00:00:01 |
    |* 13 |           TABLE ACCESS BY INDEX ROWID| BF_NOTE             |     1 |   105 |       |     1   (0)| 00:00:01 |
    |* 14 |            INDEX UNIQUE SCAN         | BF_NOTE_PK          |     1 |       |       |     1   (0)| 00:00:01 |
    |  15 |          SORT AGGREGATE              |                     |     1 |    23 |       |         |     |
    |* 16 |           INDEX RANGE SCAN           | OM_LIMIT_HIST_IDX1  |     1 |    23 |       |     0   (0)| 00:00:01 |
    |  17 |            SORT AGGREGATE            |                     |     1 |    23 |       |         |     |
    |* 18 |             INDEX RANGE SCAN         | OM_LIMIT_HIST_IDX1  |     1 |    23 |       |     0   (0)| 00:00:01 |
    |  19 |            SORT AGGREGATE            |                     |     1 |    23 |       |         |     |
    |* 20 |             INDEX RANGE SCAN         | OM_LIMIT_HIST_IDX1  |     1 |    23 |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("R">=1)
       2 - filter(ROWNUM<=50)
       4 - filter(ROWNUM<=50)
       8 - filter("EFFCTV_START_DATE">=TO_DATE(' 2008-08-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "TMPLT_ID"19 AND "TMPLT_ID"14 AND "TMPLT_ID"16 AND ("EFFCTV_END_DATE" IS NULL OR
                  "EFFCTV_END_DATE"<=TO_DATE(' 2009-08-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss')))
       9 - access("CTXSYS"."CONTAINS"("NOTE",'%test%',1)>0)
      10 - filter("DATE_CHANGED"= (SELECT /*+ */ MAX("DATE_CHANGED") FROM "OM_LIMIT_HIST" "H1" WHERE
                  "H1"."TRGT_NAME"=:B1 AND "DATE_CHANGED"< (SELECT /*+ */ MAX("DATE_CHANGED") FROM "OM_LIMIT_HIST" "H2" WHER
    E
                  "H2"."TRGT_NAME"=:B2)) OR "DATE_CHANGED"= (SELECT /*+ */ MAX("DATE_CHANGED") FROM "OM_LIMIT_HIST" "H1"
                  WHERE "H1"."TRGT_NAME"=:B3))
      13 - filter("TMPLT_ID"=19 AND "EFFCTV_START_DATE">=TO_DATE(' 2008-08-12 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "CTXSYS"."CONTAINS"("NOTE",'%test%',1)>0 AND ("EFFCTV_END_DATE" IS NULL OR
                  "EFFCTV_END_DATE"<=TO_DATE(' 2009-08-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss')))
      14 - access("B"."NOTE_ID"="A"."NOTE_ID")
      16 - access("H1"."TRGT_NAME"=:B1 AND "DATE_CHANGED"< (SELECT /*+ */ MAX("DATE_CHANGED") FROM
                  "OM_LIMIT_HIST" "H2" WHERE "H2"."TRGT_NAME"=:B2))
           filter("DATE_CHANGED"< (SELECT /*+ */ MAX("DATE_CHANGED") FROM "OM_LIMIT_HIST" "H2" WHERE
                  "H2"."TRGT_NAME"=:B1))
      18 - access("H2"."TRGT_NAME"=:B1)
      20 - access("H1"."TRGT_NAME"=:B1)

    What version of Oracle are you using?
    Your sample query is a good example of the benefits and costs of 'mixed' queries, and the challenges of mixed query performance. Oracle 11g has some very helpful new features (search for SDATA) that can really improve performance. (Specifically, it looks like your query does some useful date-range bounding. You need to get that into the FT index).
    In the end, it's not going to be easy to look at your reasonably complex query, understand the data and relationships, and wave the magic wand to make the thing go fast.

  • Oracle Eway performance problem

    Hi everyone
    I have a java collaboration definition, which use OTD for conect to oracle 10g.
    When I connect to Database, which is on external server, java collaboration take too long time to connect to database when that java collaboration receive first request message.
    When I connect to Database, which is on localhost, java collaboration connect inmediatly to database when that java collaboration receive first request message.
    I discarted network problems doin ping tonexternal database, and connecting database fro sqlplus.
    Any help will be appreciated.
    Thanks

    thank for yor response.
    JCD take 20-30 seconds to conncet to database.
    Another question: jcd connect to database, when jcd receive first message?
    Can I do jcd conncet to database when is is enabled on eManager?
    I am using javacaps 5.1.1.
    Thanks

  • Performance problem between Oracle.DataAccess v1 and v2

    Hi, I have serious performance problem with OracleDataReader when I use the GetValues method.
    My server is Oracle 9.2.0.7, and i use ODAC v10.2.0.221
    I create a dummy table for benchmark :
    create table test (a varchar2(50), b number)
    begin
    for i in 1..62359 loop
    insert into test values ('Values ' || i, i);
    end loop;
    commit;
    end;
    I use the same code for benchmark Framework v1 and Framework v2.
    Code :
    try {
    OracleConnection c = new OracleConnection("user id=saturne_dbo;password=***;data source=satedfx;");
    c.Open();
    go(c);
    c.Close();
    catch (Exception ex) {
    MessageBox.Show(ex.Message);
    private void go(IDbConnection c) {
    IDbCommand cmd = c.CreateCommand();
    cmd.CommandText = "select * from test";
    cmd.CommandType = CommandType.Text;
    DateTime dt = DateTime.Now;
    IDataReader reader = cmd.ExecuteReader();
    int count = 0;
    while (reader.Read()) {
    object[] fields = new object[reader.FieldCount];
    reader.GetValues(fields);
    count++;
    reader.Close();
    TimeSpan eps = DateTime.Now - dt;
    MessageBox.Show("Time " + count + " : " + eps.TotalSeconds);
    Result are :
    Framework v1 with OracleDataAccess 1.10.2.2.20 "Time 62359 : 0.5"
    Framework v2 with OracleDataAccess 2.10.2.2.20 "Time 62359 : 3.57" FACTOR 6 !!!!!
    I notice same problem with oleDb provider and Microsoft Oracle Client provider..
    It's a serious problem for my production server, the time calculation explode...
    Where is the explication ?
    Do u know solution ?

    Can you please try out following -
    1. Create a .NET 1.x DLL with your benchmark code. This will obviously use ODP.NET for .NET 1.x.
    2. Call this assembly routine from a .NET 1.x executable and note the results.
    3. Now call this assembly routine from a .NET 2.0 executable and note the results.
    The idea is to always use "ODP.NET for .NET 1.x" even in .NET 2.0 runtime. This will tell us whether the performance degradation is a runtime issue.

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Bad Query Performance in Oracle Text

    Hello everyone, I have the following problem:
    I have a table, TABLE_A from now on, a table of more or less 1,000.000 rows, with a CONTEXT index, using FILE_DATASTORE, CTXSYS.DEFAULT_STORAGE, CTXSYS.NULL_FILTER, CTXSYS.BASIC_LEXER and querying the index in the following way:
    SELECT /*+FIRST_ROWS*/ A.ID, B.ID2, SCORE(1) FROM TABLE_A A, TABLE_B WHERE A.ID = B.ID AND CONTAINS(A.PATH, '<SOME KW>', 1) > 0 ORDER BY SCORE(1) DESC
    where TABLE_B has another 1,000.000 rows.
    The problem is that the query response time is much higher after some time of inactivity regarding those tables. How can I avoid this behavior?. The fact is that those inactivity times (not more than 20min) are core to my application, so I always get long long response times for my queries.
    Is there any cache or cache time parameter that affects this behavior? I have checked the Oracle Text documentation without finding anything about that...
    More data: I am using Oracle 9.2.0.1, but I have tested with the latest patches an the behavior is the same...
    Thank you very much in advance.

    Pablo,
    This appears to be a generic database or OS issue, not a Text specific issue. It really depends on what your application is doing.
    If your application is doing some other database activity such as queries or DMLs on other non-text tables, chances are Oracle Text related data blocks are being aged out of cache. You can either increase the db_cache_size init
    parmater or try to keep the text tables and index tables blocks in cache using ALTER TABLE commands.
    If your app is doing NON-database activity, then chances are your application is taking up much of the machine's physical memory such that OS is swapping ORACLE out of the memory. In which case, you may want to consider to add more memory to the machine or have ORACLE run on a separate machine by itself.

  • Query Performance Problem!! Oracle 25 minutes || SQLServer 3 minutes

    Hi all,
    I'm having a performance problem with this query bellow. It runs in 3 minutes on SQLServer and 25 minutes in Oracle.
    SELECT
    CASE WHEN (GROUPING(a.estado) = 1) THEN 'TOTAL'
    ELSE ISNULL(a.estado, 'UNKNOWN')
    END AS estado,
    CASE WHEN (GROUPING(m.id_plano) = 1) THEN 'GERAL'
    ELSE ISNULL(m.id_plano, 'UNKNOWN')
    END AS id_plano,
    sum(m.valor_2s_parcelas) valor_2s_parcelas,
    convert(decimal(15,2),convert(int,sum(convert(int,(m.valor_2s_parcelas+.0000000001)*100)*
    isnull(e.percentual,0.0))/100.0+.0000000001))/100 BB_Educar
    FROM
    movimento_dco m ,
    evento_plano e,
    agencia_tb a
    WHERE
    m.id_plano = e.id_plano
    AND m.agencia *= a.prefixo
    --AND  m.id_plano LIKE     'pm60%'
    AND m.data_pagamento >= '20070501'
    AND m.data_pagamento <= '20070531'
    AND m.codigo_retorno = '00'
    AND m.id_parcela > 1
    AND m.valor_2s_parcelas > 0.
    AND e.id_evento = 'BB-Educar'
    AND a.banco_id = '001'
    AND a.ordem = '00'
    group by m.id_plano, a.estado WITH ROLLUP
    order by a.estado, m.id_plano DESC
    Can anyone help me with this query?

    What version of Oracle, what version of SQL? Are the tables the same exact size? are they both indexed the same? Are you running on the some or similar hardware? Are the Oracle parameters similar like SGA size and PGA_AGGREGATE Target? Did you run statistics in Oracle?
    Did you compare execution plans in SQL Server vs Oracle to see if SQl Servers execution plan is more superior than the one Oracle is trying to use? (most likely stale statistics).
    There are many variables and we need more information than just the Query : ).

  • Oracle Text - Problem with filtering binary documents (.doc, .pdf, etc...)

    Hi, I have a problem with filtering binary documents (.doc, .pdf, etc...). I use SQL*PLUS for remote access to Oracle 10.2 on Linux and I create table:
    CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    I insert to this table:
    INSERT into test values(1, 'PATH/text1.doc‘);
    INSERT into test values(2,'PATH/text2.doc‘);
    and then:
    CREATE INDEX test_index ON test(text) indextype is ctxsys.context
    parameters (’datastore ctxsys.file_datastore
    filter ctxsys.auto_filter’);
    Message "Index created" is displayed, but objects: DR$test_index$I, DR$test_index$K, DR$test_index$N, DR$test_index$R and DR$test_index$P are empty => index wasn´t created probably.
    I don´t know, where is bug, either bug is somewhere in this code or on the server (wrong installation oracle or constraint privileges). Do you know in what is bug?

    The following is an excerpt from the 10g online documentation. Note the items that I have put in bold.
    "FILE_DATASTORE
    The FILE_DATASTORE type is used for text stored in files accessed through the local file system.
    Note:
    FILE_DATASTORE may not work with certain types of remote mounted file systems.
    FILE_DATASTORE has the following attribute(s):
    Table 2-4 FILE_DATASTORE Attributes
    Attribute Attribute Value
    path path1:path2:pathn
    path
    Specify the full directory path name of the files stored externally in a file system. When you specify the full directory path as such, you need only include file names in your text column.
    You can specify multiple paths for path, with each path separated by a colon (:) on UNIX and semicolon(;) on Windows. File names are stored in the text column in the text table.
    If you do not specify a path for external files with this attribute, Oracle Text requires that the path be included in the file names stored in the text column.
    PATH Attribute Limitations
    The PATH attribute has the following limitations:
    If you specify a PATH attribute, you can only use a simple filename in the indexed column. You cannot combine the PATH attribute with a path as part of the filename. If the files exist in multiple folders or directories, you must leave the PATH attribute unset, and include the full file name, with PATH, in the indexed column.
    On Windows systems, the files must be located on a local drive. They cannot be on a remote drive, whether the remote drive is mapped to a local drive letter."
    With accessible paths and files, you get something like:
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(1,'c:\oracle11g\banana.pdf');
    1 row created.
    SCOTT@orcl_11g> INSERT into test values(2,'c:\oracle11g\cranberry.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
           608
    SCOTT@orcl_11g> In the following, I used a non-existent path and non-existent file name, which produces the same results as when you use a remote path that does not exist locally.
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(3,'c:\nosuchpath\nosuchfile.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
             0
    SCOTT@orcl_11g>

Maybe you are looking for

  • Graphics issues with MacBook Pro Retina

    I bought my 15" MBPr in July and have been living with these issues since the beginning. Generally the issue happens when scrolling or writing in forms on web pages in Safari. Often times pieces of the web page will stick or ghost. This also sometime

  • Table control in Screen

    Hi, I have designed an interface like SM31 to maintain a Z-table. My requirement is that I don't want to make Key fields input-enabled until user want to insert a new record and when user clicks on button in toolbar to insert a new row in table contr

  • Certification on SAP Netweaver 7.1 (CE)

    Hi, We are a little bit ahead of things, but is there already any idea about what the certification criteria for a J2EE deployment are going to be for SAP Netweaver 7.1? Is it going to be similar to 7.0 or are criteria drastically going to change in

  • NIK Plugins Killed Trial?

    For one day after installing a Trial version of Photoshop CS6 for Mac it worked fine. The next day (today) I installed my NIK/Google Plugins Collection and now Photoshop won't open and says "Your Trial Has Expired" and just offers to let me purchase

  • Ichat quits when i try to use isight

    i just got an isight and it works great on my powerbook but when i try to use it on my mac pro its force quits instantly please help