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.

Similar Messages

  • An index can not being used and still afect a query performance?

    Hi i have a query with a high cost so i created two indexes, A and B, to improve its performance.
    After the creation of the indexes when i reviewed the execution plan of the query the cost had been reduced, but i noticed that the index B is not being used,
    and if i try to force the query to use index B with a HINT the cost increases, so i decided to drop the index B.
    Once i droped the index B i checked the execution plan again and then i noticed that the cost of the query increased, if i recreate the index B the explain plan
    shows a lower cost even though its not being used by the execution plan.
    Does anyone know why is this happening?
    An index can, not being used by the execution plan and still affect a query performance?

    user11173393 wrote:
    Hi i have a query with a high cost so i created two indexes, A and B, to improve its performance.
    After the creation of the indexes when i reviewed the execution plan of the query the cost had been reduced, but i noticed that the index B is not being used,
    and if i try to force the query to use index B with a HINT the cost increases, so i decided to drop the index B.
    Once i droped the index B i checked the execution plan again and then i noticed that the cost of the query increased, if i recreate the index B the explain plan
    shows a lower cost even though its not being used by the execution plan.
    Does anyone know why is this happening?
    An index can, not being used by the execution plan and still affect a query performance?You said that is what is happening, & I believe you.

  • 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.

  • Creating a single context index on a one-to-many and lookup table

    Hello,
    I've been successfully setting up text indexes on multiple columns on the same table (using MULTI_COLUMN_DATASTORE preferences), but now I have a situation with a one-to-many data collection table (with a FK to a lookup table), and I need to search columns across both of these tables. Sample code below, more of my chattering after the code block:
    CREATE TABLE SUBMISSION
    ( SUBMISSION_ID             NUMBER(10)          NOT NULL,
      SUBMISSION_NAME           VARCHAR2(100)       NOT NULL
    CREATE TABLE ADVISOR_TYPE
    ( ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      ADVISOR_TYPE_NAME         VARCHAR2(50)        NOT NULL
    CREATE TABLE SUBMISSION_ADVISORS
    ( SUBMISSION_ADVISORS_ID    NUMBER(10)          NOT NULL,
      SUBMISSION_ID             NUMBER(10)          NOT NULL,
      ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      FIRST_NAME                VARCHAR(50)         NULL,
      LAST_NAME                 VARCHAR(50)         NULL,
      SUFFIX                    VARCHAR(20)         NULL
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (1, 'Some Research Paper');
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (2, 'Thesis on 17th Century Weather Patterns');
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (3, 'Statistical Analysis on Sunny Days in March');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (1, 'Department Chair');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (2, 'Department Co-Chair');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (3, 'Professor');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (4, 'Associate Professor');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (5, 'Scientist');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (1,1,2,'John', 'Doe', 'PhD');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (2,1,2,'Jane', 'Doe', 'PhD');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (3,2,3,'Johan', 'Smith', NULL);
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (4,2,4,'Magnus', 'Jackson', 'MS');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (5,3,5,'Williard', 'Forsberg', 'AMS');
    COMMIT;I want to be able to create a text index to lump these fields together:
    SUBMISSION_ADVISORS.FIRST_NAME
    SUBMISSION_ADVISORS.LAST_NAME
    SUBMISSION_ADVISORS.SUFFIX
    ADVISOR_TYPE.ADVISOR_TYPE_NAME
    I've looked at DETAIL_DATASTORE and USER_DATASTORE, but the examples in Oracle Docs for DETAIL_DATASTORE leave me a little bit perplexed. It seems like this should be pretty straightforward.
    Ideally, I'm trying to avoid creating new columns, and keeping the trigger adjustments to a minimum. But I'm open to any and all suggestions. Thanks for for your time and thoughts.
    -Jamie

    I would create a procedure that creates a virtual document with tags, which is what the multi_column_datatstore does behind the scenes. Then I would use that procedure in a user_datastore, so the result is the same for multiple tables as what a multi_column_datastore does for one table. I would also use either auto_section_group or some other type of section group, so that you can search using WITHIN as with the multi_column_datastore. Please see the demonstration below.
    SCOTT@orcl_11gR2> -- tables and data that you provided:
    SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION
      2  ( SUBMISSION_ID           NUMBER(10)          NOT NULL,
      3    SUBMISSION_NAME           VARCHAR2(100)          NOT NULL
      4  )
      5  /
    Table created.
    SCOTT@orcl_11gR2> CREATE TABLE ADVISOR_TYPE
      2  ( ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      3    ADVISOR_TYPE_NAME      VARCHAR2(50)          NOT NULL
      4  )
      5  /
    Table created.
    SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION_ADVISORS
      2  ( SUBMISSION_ADVISORS_ID      NUMBER(10)          NOT NULL,
      3    SUBMISSION_ID           NUMBER(10)          NOT NULL,
      4    ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      5    FIRST_NAME           VARCHAR(50)          NULL,
      6    LAST_NAME           VARCHAR(50)          NULL,
      7    SUFFIX                VARCHAR(20)          NULL
      8  )
      9  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      3    VALUES (1, 'Some Research Paper')
      4  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      5    VALUES (2, 'Thesis on 17th Century Weather Patterns')
      6  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      7    VALUES (3, 'Statistical Analysis on Sunny Days in March')
      8  SELECT * FROM DUAL
      9  /
    3 rows created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      3    VALUES (1, 'Department Chair')
      4  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      5    VALUES (2, 'Department Co-Chair')
      6  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      7    VALUES (3, 'Professor')
      8  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      9    VALUES (4, 'Associate Professor')
    10  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
    11    VALUES (5, 'Scientist')
    12  SELECT * FROM DUAL
    13  /
    5 rows created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      3    VALUES (1,1,2,'John', 'Doe', 'PhD')
      4  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      5    VALUES (2,1,2,'Jane', 'Doe', 'PhD')
      6  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      7    VALUES (3,2,3,'Johan', 'Smith', NULL)
      8  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      9    VALUES (4,2,4,'Magnus', 'Jackson', 'MS')
    10  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
    11    VALUES (5,3,5,'Williard', 'Forsberg', 'AMS')
    12  SELECT * FROM DUAL
    13  /
    5 rows created.
    SCOTT@orcl_11gR2> -- constraints presumed based on your description:
    SCOTT@orcl_11gR2> ALTER TABLE submission ADD CONSTRAINT submission_id_pk
      2    PRIMARY KEY (submission_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> ALTER TABLE advisor_type ADD CONSTRAINT advisor_type_id_pk
      2    PRIMARY KEY (advisor_type_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_advisors_id_pk
      2    PRIMARY KEY (submission_advisors_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_id_fk
      2    FOREIGN KEY (submission_id) REFERENCES submission (submission_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT advisor_type_id_fk
      2    FOREIGN KEY (advisor_type_id) REFERENCES advisor_type (advisor_type_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> -- resulting data:
    SCOTT@orcl_11gR2> COLUMN submission_name FORMAT A45
    SCOTT@orcl_11gR2> COLUMN advisor      FORMAT A40
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  sa.advisor_type_id = a.advisor_type_id
    10  AND    sa.submission_id = s.submission_id
    11  /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    Statistical Analysis on Sunny Days in March   Scientist Williard Forsberg AMS
    5 rows selected.
    SCOTT@orcl_11gR2> -- procedure to create virtual documents:
    SCOTT@orcl_11gR2> CREATE OR REPLACE PROCEDURE submission_advisors_proc
      2    (p_rowid IN           ROWID,
      3       p_clob     IN OUT NOCOPY CLOB)
      4  AS
      5  BEGIN
      6    FOR r1 IN
      7        (SELECT *
      8         FROM      submission_advisors
      9         WHERE  ROWID = p_rowid)
    10    LOOP
    11        IF r1.first_name IS NOT NULL THEN
    12          DBMS_LOB.WRITEAPPEND (p_clob, 12, '<first_name>');
    13          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.first_name), r1.first_name);
    14          DBMS_LOB.WRITEAPPEND (p_clob, 13, '</first_name>');
    15        END IF;
    16        IF r1.last_name IS NOT NULL THEN
    17          DBMS_LOB.WRITEAPPEND (p_clob, 11, '<last_name>');
    18          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.last_name), r1.last_name);
    19          DBMS_LOB.WRITEAPPEND (p_clob, 12, '</last_name>');
    20        END IF;
    21        IF r1.suffix IS NOT NULL THEN
    22          DBMS_LOB.WRITEAPPEND (p_clob, 8, '<suffix>');
    23          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.suffix), r1.suffix);
    24          DBMS_LOB.WRITEAPPEND (p_clob, 9, '</suffix>');
    25        END IF;
    26        FOR r2 IN
    27          (SELECT *
    28           FROM   submission
    29           WHERE  submission_id = r1.submission_id)
    30        LOOP
    31          DBMS_LOB.WRITEAPPEND (p_clob, 17, '<submission_name>');
    32          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r2.submission_name), r2.submission_name);
    33          DBMS_LOB.WRITEAPPEND (p_clob, 18, '</submission_name>');
    34        END LOOP;
    35        FOR r3 IN
    36          (SELECT *
    37           FROM   advisor_type
    38           WHERE  advisor_type_id = r1.advisor_type_id)
    39        LOOP
    40          DBMS_LOB.WRITEAPPEND (p_clob, 19, '<advisor_type_name>');
    41          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r3.advisor_type_name), r3.advisor_type_name);
    42          DBMS_LOB.WRITEAPPEND (p_clob, 20, '</advisor_type_name>');
    43        END LOOP;
    44    END LOOP;
    45  END submission_advisors_proc;
    46  /
    Procedure created.
    SCOTT@orcl_11gR2> SHOW ERRORS
    No errors.
    SCOTT@orcl_11gR2> -- examples of virtual documents that procedure creates:
    SCOTT@orcl_11gR2> DECLARE
      2    v_clob  CLOB := EMPTY_CLOB();
      3  BEGIN
      4    FOR r IN
      5        (SELECT ROWID rid FROM submission_advisors)
      6    LOOP
      7        DBMS_LOB.CREATETEMPORARY (v_clob, TRUE);
      8        submission_advisors_proc (r.rid, v_clob);
      9        DBMS_OUTPUT.PUT_LINE (v_clob);
    10        DBMS_LOB.FREETEMPORARY (v_clob);
    11    END LOOP;
    12  END;
    13  /
    <first_name>John</first_name><last_name>Doe</last_name><suffix>PhD</suffix><submission_name>Some
    Research Paper</submission_name><advisor_type_name>Department Co-Chair</advisor_type_name>
    <first_name>Jane</first_name><last_name>Doe</last_name><suffix>PhD</suffix><submission_name>Some
    Research Paper</submission_name><advisor_type_name>Department Co-Chair</advisor_type_name>
    <first_name>Johan</first_name><last_name>Smith</last_name><submission_name>Thesis on 17th Century
    Weather Patterns</submission_name><advisor_type_name>Professor</advisor_type_name>
    <first_name>Magnus</first_name><last_name>Jackson</last_name><suffix>MS</suffix><submission_name>The
    sis on 17th Century Weather Patterns</submission_name><advisor_type_name>Associate
    Professor</advisor_type_name>
    <first_name>Williard</first_name><last_name>Forsberg</last_name><suffix>AMS</suffix><submission_name
    Statistical Analysis on Sunny Days inMarch</submission_name><advisor_type_name>Scientist</advisor_type_name>
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- user_datastore that uses procedure:
    SCOTT@orcl_11gR2> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('sa_datastore', 'USER_DATASTORE');
      3    CTX_DDL.SET_ATTRIBUTE ('sa_datastore', 'PROCEDURE', 'submission_advisors_proc');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- index (on optional extra column) that uses user_datastore and section group:
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD (any_column VARCHAR2(1))
      2  /
    Table altered.
    SCOTT@orcl_11gR2> CREATE INDEX submission_advisors_idx
      2  ON submission_advisors (any_column)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS
      5    ('DATASTORE     sa_datastore
      6        SECTION GROUP     CTXSYS.AUTO_SECTION_GROUP')
      7  /
    Index created.
    SCOTT@orcl_11gR2> -- what is tokenized, indexed, and searchable:
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$submission_advisors_idx$i
      2  /
    TOKEN_TEXT
    17TH
    ADVISOR_TYPE_NAME
    AMS
    ANALYSIS
    ASSOCIATE
    CENTURY
    CHAIR
    CO
    DAYS
    DEPARTMENT
    DOE
    FIRST_NAME
    FORSBERG
    JACKSON
    JANE
    JOHAN
    JOHN
    LAST_NAME
    MAGNUS
    MARCH
    PAPER
    PATTERNS
    PHD
    PROFESSOR
    RESEARCH
    SCIENTIST
    SMITH
    STATISTICAL
    SUBMISSION_NAME
    SUFFIX
    SUNNY
    THESIS
    WEATHER
    WILLIARD
    34 rows selected.
    SCOTT@orcl_11gR2> -- sample searches across all data:
    SCOTT@orcl_11gR2> VARIABLE search_string VARCHAR2(100)
    SCOTT@orcl_11gR2> EXEC :search_string := 'professor'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string) > 0
    10  AND    sa.advisor_type_id = a.advisor_type_id
    11  AND    sa.submission_id = s.submission_id
    12  /
    SUBMISSION_NAME                               ADVISOR
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    2 rows selected.
    SCOTT@orcl_11gR2> EXEC :search_string := 'doe'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    2 rows selected.
    SCOTT@orcl_11gR2> EXEC :search_string := 'paper'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    2 rows selected.
    SCOTT@orcl_11gR2> -- sample searches within specific columns:
    SCOTT@orcl_11gR2> EXEC :search_string := 'chair'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN advisor_type_name') > 0
    10  AND    sa.advisor_type_id = a.advisor_type_id
    11  AND    sa.submission_id = s.submission_id
    12  /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    2 rows selected.
    SCOTT@orcl_11gR2> EXEC :search_string := 'phd'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN suffix') > 0
    10  AND    sa.advisor_type_id = a.advisor_type_id
    11  AND    sa.submission_id = s.submission_id
    12  /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    2 rows selected.
    SCOTT@orcl_11gR2> EXEC :search_string := 'weather'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN submission_name') > 0
    10  AND    sa.advisor_type_id = a.advisor_type_id
    11  AND    sa.submission_id = s.submission_id
    12  /
    SUBMISSION_NAME                               ADVISOR
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    2 rows selected.

  • Can DataObjectOperationsByName be used to retrieve multiple rows?

    I am attempting to use the DataObjectOperationsByName webservice Get method to retrieve a list of rows based on a column value, but based on my work so far, it looks like this may not be possible. Can anyone confirm this?
    I have implemented some BAM counters and intervals in my BPEL processes, which has automatically created the "/Samples/Monitor Express" path with the COMPONENT, COUNTER and INTERVAL data objects in BAM after deployment of the BPEL process to the soa-server. These measurements are successfully being populated whenever the BPEL processes are run.
    I have a number of BPEL processes - two of which are called "getClient" and "createClient", so I am attempting to use the following webservice payload to retrieve all "createClient" rows from the data object using DataObjectOperationsByName Get method:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bam="http://xmlns.oracle.com/bam">
    <soapenv:Header/>
    <soapenv:Body>
    <bam:Get>
    <!--Optional:-->
    <bam:keysCSV>COMPONENT_NAME</bam:keysCSV>
    <!--Optional:-->
    <bam:xmlPayload>
              <![CDATA[
              <DataObject Name="COMPONENT" Path="/Samples/Monitor Express">
              <Contents>
              <Row>
              <Column Name="COMPONENT_NAME" Value="createClient"/>
              </Row>
              </Contents>
              </DataObject>]]>
         </bam:xmlPayload>
    </bam:Get>
    </soapenv:Body>
    </soapenv:Envelope>
    However, this only returns the first row that it finds that matches the COMPONENT_NAME of createClient, where I know that there are many more rows matching that value.
    Does anyone know if this sort of query is possible using this webservice?
    Cheers,
    Marc.

    fotobymatt
    Welcome to the Apple DIscussions
    No, it can't be used with multiple files. This is true in iPhoto and iTunes as well.
    When you unchecked 'Copy files to the iPhoto Library Folder...' you assumed responsibility for the file management. This is exactly the kind of thing that is very easy when iphoto does the file management. (Drag the pics to the iPhoto trash, empty the trash, files gone from iPhoto and HD)
    As the entire philosophy of iPhoto is to leave the Original alone, yes, the changes to titles, dates etc are only reflected in iPhoto and can only be applied to the File on export.
    What might work is to name the files prior to import. Using a batch renamer like FileList (http://www.petermaurer.de/nasi.php?section=filelist) to assign a basic sequential naming structure: TuesdaysPics.1, ,2, ,3... this might make it easie to track the pics down by noting the numbers - and using Spotlight.
    Best I could come up with.
    Regards
    TD

  • Mapping an object using values from multiple tables

    Is it possible to use values looked up in other tables when mapping an object?
    For example: I have three tables. In table 1, I have fields for 'cityCode' and 'stateCode'. Table 2 is a state table which contains a list of stateCodes and corresponding stateIds. Table 3 is a city table with cityCodes listed by stateId (the city code is unique within the stateId but can be duplicated under other stateIds). Table 3 also contains the cityName for the matching cityCode/stateId pair.
    I am ultimately trying to match a cityName to a cityCode. I can't figure out how to tell toplink use the stateId returned when mapping Table 1 to Table 2 via stateCode when mapping cityCode in Table 1 to Table 3.
    Any help is greatly appreciated
    --matt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    What does your object model look like, do you have a single object with data from all three tables in it?
    <p>
    In general because the cardinality of the tables and usage does not match, I would not recommend using multiple tables to map this. Instead define a CityNameManager class that preloads and stores all of the city names for each state, (possible lazy initializing each set of cities per state). Your getCityName() method in your class would then just use this manager.
    <p>
    You could map the multiple tables but it may be difficult, and would most likely need to be read-only because I don't think you want to insert into the table2 or 3. You basically have a foreign key table1.stateCode => table2.stateCode, (table1.cityCode, table2.stateId) => (table3.cityCode, table3.stateId). You probably cannot define this in the Mapping Workbench, so would need to use the ClassDescriptor code API and an amendment method. If you can't get the foreign keys to work you can always use the descriptor multipleTableJoinExpression and define the join directly.
    <p>
    You could also define a OneToOneMapping to the CityName from your object using the cityCode and using a selectionCriteria() on your mapping to provide an expression that uses the getTable() method to join to the intermediate table.
    <p>
    <p>---
    <p>James Sutherland

  • Can JWS be used as a multiple Java version management tool?

    WinNT4 WKS with JRE 1.3.1 - 1.4.2 loaded on it using IExplorer or Netscape.
    We don't have a need for the JWS download features because our clients (and their applications) remain static for the most part. However, we do require multiple JRE version support because our customers have written class/objet "fixes" (mostly for text rendering) and these fixes break if you try and run the application on a different version of Java from which it was written. Basically, we can't have a default JRE on each machine and hope that it will work with all customer applications. So we will load all necessary Java components on our workstations (in this case JRE versions 1.3.1 - 1.4.2). I know that browsers can be forced to load with a specific Plug-in version (providing it exists on the machine) through Object & Embed tags in the HTML and that standalone apps can be directed to the correct Java directory path. My question is, can JWS automatically identify the Java requirements of our customers applications and act simply as a multi-version management tool to provide the right JRE/Plug-In for either standalone or browser applications? Keeping in mind that all the JREs will be loaded on the workstions and it won't need to download any components from some site.
    I've noticed that JWS identifies all JREs loaded on a machine in the Java tab so I'm wondering if it can "switch" the environment as needed for each application.
    Does anyone know if I can use JWS in the scenario I described above? Thanks!

    JWS can manage the multiple JREs installed if you run the application through a .jnlp. This can not "switch" the default JRE. It runs the application specified in the .jnlp using the requested version specified in the .jnlp.
    JWS does not apply to applets. You should use the object tags as you mentioned below.
    ...can JWS automatically identify the Java requirements of our customers applications
    No. You must determine this and setup the .jnlp appropriately.

  • Using Desc on Multiple tables

    I am trying to find a way to run DESC (or similar) on every table belonging to a certain user. So far I have had no luck finding a way of doing this, other than brute force.
    The problem with brute forcing it is that the user has ~250 tables that I would need to run this on. I was hoping to find a script or a query that would let me do this and output it to a file.
    Any thoughts?
    Jed

    Maybe the objects belong to another schema. Try the
    following:
    SELECT table_name,
    column_name,
    data_type,
    data_length,
    data_precision,
    nullable
    all_tab_columns
    WHERE owner = 'YOUR_OTHER_SCHEMA'
    /code]
    of course replace YOUR_OTHERS_SCHEMA with the actual
    schema name.This finally worked for me, thank you so much. The Owner part at the bottom was the key. I just need to clever with the linespacing and grouping now.
    Thanks again so much.

  • Max no of records that can be dispalyed using ALV GRID CONTROLS

    Hi ,
    Can any one please tell me the maximum no of records that are allowed to be displayed using the ALV grid controls.
    As I am getting dump for more records and I need to control the report based on the max no of records that can be actually diplayed using contols.
    Thanks,
    Kavya.

    Dear Kavya.
    If you are getting Dump because you have too many records it means that there is something wrong with the program design.
    ALV is not meant to display more than few thousands of records.
    There is no point is displaying more than few thousands because it will over-flow the users and it will do no good for them.
    If the problem is with the Internal-tables that you're using to manipulate the data, you can think of using an intermidiate DB table that will hold summarized data of the DB data and can be filled via a periodic job. This have the benfit of speeding up the ALV program too.
    thanx
    ayal.

  • How can I list used database/table size resp user space ? Compression after

    How can I list used + maximum tablespace/database/table size of an Oracle database ?
    How can I list the space used currently by a user resp. his tables+indizes ?
    By the way: If I delete a user or table from an Oracle database installation: are then only the entires deleted
    or is the space released as well ?
    In otherwords: After I deleted a user resp. table is it recommended to do something like a "compress" similarly to Outlook
    or other eMail clients to shrink really the occupied space on hard disc ?

    I hope this helps you
    select df.tablespace_name "Tablespace",
    totalusedspace "Used MB",
    (df.totalspace - tu.totalusedspace) "Free MB",
    df.totalspace "Total MB",
    round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))
    "Pct. Free"
    from
    (select tablespace_name,
    round(sum(bytes) / 1048576) TotalSpace
    from dba_data_files
    group by tablespace_name) df,
    (select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name
    from dba_segments
    group by tablespace_name) tu
    where df.tablespace_name = tu.tablespace_name;

  • Indexes in table join

    Hi Experts,
    I have three tables and I am using a join condition to link the three tables. Just need to know how can I improve the performance of the select query by using indexes. Can a secondary index be used in join table where in the where clause i have attributes from three different tables. If yes how do I do it.
    Please suggest solution with examples.
    Help will be much appreciated.
    Regards.

    Hi
    joining 3 tables may refer in bad performance
    because if the number of table or 2 then you can go for joins
    if the number of tables are more than 2 then use for all entries
    because if you use more than 3 tables in the data base connection will be there for that 3 tables up to displaying the data
    if you use for all entries then no need of joining the tables
    finally
    for all entries have more performance than joins
    <b>Primary and secondary indexes</b>
    Index: Technical key of a database table.
    Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
    Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.
    <b>Structure of an Index</b>
    An index can be used to speed up the selection of data records from a table.
    An index can be considered to be a copy of a database table reduced to certain fields. The data is stored in sorted form in this copy. This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of the table are contained in the index. The index also contains a pointer from the index entry to the corresponding table entry to permit all the field contents to be read.
    When creating indexes, please note that:
    An index can only be used up to the last specified field in the selection! The fields which are specified in the WHERE clause for a large number of selections should be in the first position.
    Only those fields whose values significantly restrict the amount of data are meaningful in an index.
    When you change a data record of a table, you must adjust the index sorting. Tables whose contents are frequently changed therefore should not have too many indexes.
    Make sure that the indexes on a table are as disjunctive as possible.
    (That is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.)
    <b>Accessing tables using Indexes</b>
    The database optimizer decides which index on the table should be used by the database to access data records.
    You must distinguish between the primary index and secondary indexes of a table. The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
    The indexes on a table have a three-character index ID. '0' is reserved for the primary index. Customers can create their own indexes on SAP tables; their IDs must begin with Y or Z.
    If the index fields have key function, i.e. they already uniquely identify each record of the table, an index can be called a unique index. This ensures that there are no duplicate index fields in the database.
    When you define a secondary index in the ABAP Dictionary, you can specify whether it should be created on the database when it is activated. Some indexes only result in a gain in performance for certain database systems. You can therefore specify a list of database systems when you define an index. The index is then only created on the specified database systems when activated
    <b>Reward if usefull</b>

  • How to use multiple tables in DRIVING_SITE

    Hi All,
    I see very bad performance with my query having dblinks to remote database.
    How can I use DRIVING_SITE for multiple remote tables here?
    Does it it useful to use on DRIVING_SITE multiple tables?
    What is impact of using ORDER BY on local table column ( table A in below case) in the query?
    SELECT A.col1, B.col2 , C.col3
    FROM A, B@dblink1, C@dblink1, D@dblink2
    WHERE <few join conditions>
    ORDER BY A.col1 ;
    Join conditions in above query is taken care to have better performance. But from our analysis it is understood that poor performance is due to DB Links to remoate database. What is best approach to get good performance with DB Links?
    Regards,
    Ram

    http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/ds_appdev004.htm#ADMIN12196
    Will give you an idea of where to start.

  • Using .vit for multiple instance

    Hi,
    I have a main vi, uses rendevous to run multiple subvis at the same time, that needs to be opened separately per user which need to open the same vi multiple times.
    I tried to use .vit, changed main vi to vit. Created new vi that calls this main.vit. However this doesn't run multiple times, only opens the first window. Then I used subVIs as vit. This even creates a bigger problem. The sub vi's that opened doesn't run.
    I think I'm missing some basic concepts of using vit. I searched the forum, found some articles but I can't find what I'm doing wrong.
    Should main vit calling several sub vit's work?
    Any tips, comments would help.
    Thank you very much.

    "CoastalMaineBird" <[email protected]> wrote in message news:[email protected]..
    VIT is not for multiple instances, it is a TEMPLATE. That means you open it up, but when you go to save it, it pretends that it's untitled, and you have to give it a new name.
    That's useful - for example, I have a TIMING TEMPLATE. When I want to time something. I open this VIT file. I insert the code I want to time into a certain frame, and run it. I usually don't save it, but if I do, I have to give it a new name.
    That way, the next time I open it, it's fresh again.
    If you want to run the same VI multiple times in parallel, you must:
    - Understand what RE-ENTRANT EXECUTION means.
    - Set the VI to use re-entrant execution.
    - Use the VI Server to open each instance dynamically.
    - Use the VI Server to CLOSE each instance dynamically.
    - Be very careful about getting data into and out of the VI in question.
    HTH
    VI Templates can also be used to run multiple instances of the same vi. If you open a .vit dynamically several times, you'll end up with several instances of the vit. Actually, this is an intended use of the vi templates. And it works great. The great benefit over reentrant vi's is that the vi templates have front panels of there own. So it's great to use vit's when you want several similar panel, without copying the code. Reentrant vi's where not intended for this. Before 8.0, reentrant vi's didn't even have panels that updated properly, so you had to use a vit.
    Regards,
    Wiebe.

  • 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

  • In-Context Editor can't handle implicit index.html

    The In-Context Editor can't handle implicit index.html - e.g., when a menu link points to /subfolder/ with a file named index.html inside, the link works fine on the front-end but In-Context Editor users get a 404 Page Not Found error.
    Naively, it appends .htm to the folder, producing an invalid url like this: /subfolder/.htm
    The workaround is to explicitly include the filename in the link like /subfolder/index.html, but this is undesirable.
    Anyone else been bitten by this?

    /subfolder
    Will go to the same place as well.

Maybe you are looking for

  • BO 4.1+ IE9 document link in webi?

    Hello All, We are using BO 4.1 & IE8 previously. Recently we upgraded the version of IE8 to IE9. When I open Master - Detail Reports, the tool is not behaving properly and its not opening up the detail report when clicked from master report. Is there

  • What do you do when your ipod nano 4th generation will not turn on even if you charge it?

    i have a 4th generation ipod nano and it died so i tried charging it for an hour and it wouldn't turn back on. then i connected it to my computer and it would not even turn on or show up on my computer. What do i do?

  • Easy Points...Easy Question

    I know you take out the battery, but then what do you do to perform a hard-reset of a macbook?

  • Safari 8.0.2 will not launch after a crash

    Safari quit unexpectedly (when I tried to download a photo app), got pop up window asking me to select restart which I tried and it just keeps popping back up and won't restart.  Tried the "hold down the shift key" and nothing.  I've restarted and it

  • How do I remove the status bar from iPhone apps on the iPad?

    Whenever I go onto an iPhone app on my ipad I have recently had the status bar covering up some of my game. Here is an example: http://i.imgur.com/Q9xnYhT.jpg As you can see the score is hidden, I have gone through the settings and can't find anythin