Where clause sequence

Hi
select /some fields/ where clause field1=:b1 and field2=:b2 etc;
Does sequence of field1 field2 in where cluase matters in reducing fetch time
i.e
select /some fields/ where field2=:b2 etc and field1=:b1
will be faster
Prashant

Hi,
An example,
SQL> select s.statement_id, s.plan_id
from plan_table s, plan_table2 p
where s.statement_id=p.statement_id
and s.plan_id=p.plan_id
Explain Plan
PLAN_TABLE_OUTPUT
Plan hash value: 2320652973
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 50 | 21 (5)| 00:00:01 |
|* 1 | HASH JOIN | | 1 | 50 | 21 (5)| 00:00:01 |
|* 2 | TABLE ACCESS FULL| PLAN_TABLE | 1 | 20 | 17 (0)| 00:00:01 |
| 3 | TABLE ACCESS FULL| PLAN_TABLE2 | 850 | 25500 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("S"."STATEMENT_ID"="P"."STATEMENT_ID" AND
"S"."PLAN_ID"="P"."PLAN_ID")
2 - filter("S"."STATEMENT_ID" IS NOT NULL)
Note
- dynamic sampling used for this statement
and
SQL> select s.statement_id, s.plan_id
from plan_table s, plan_table2 p
where s.plan_id=p.plan_id
and s.statement_id=p.statement_id
Explain Plan
PLAN_TABLE_OUTPUT
Plan hash value: 2320652973
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 50 | 21 (5)| 00:00:01 |
|* 1 | HASH JOIN | | 1 | 50 | 21 (5)| 00:00:01 |
|* 2 | TABLE ACCESS FULL| PLAN_TABLE | 1 | 20 | 17 (0)| 00:00:01 |
| 3 | TABLE ACCESS FULL| PLAN_TABLE2 | 850 | 25500 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("S"."PLAN_ID"="P"."PLAN_ID" AND
"S"."STATEMENT_ID"="P"."STATEMENT_ID")
2 - filter("S"."STATEMENT_ID" IS NOT NULL)
Note
- dynamic sampling used for this statement
Adith

Similar Messages

  • Sequence of tables in from clause and sequence of "where clause" conditions

    Is Sequence of tables in "From Clause" and sequence of "where clause" conditions matters in 10g for performance?
    Edited by: user6763079 on Jun 1, 2011 3:33 AM

    user6763079 wrote:
    Is Sequence of tables in "From Clause" and sequence of "where clause" conditions matters in 10g for performance?In general it does not matter.
    It could matter if the Rule Based Optimizer (RBO) is used. However this RBO is only used if enforced by a hint or if no table statistics are collected. Starting from 10g the table statistics are automatically selected by a regular database job. So in general the CBO would be used.
    The CBO will consider different access paths. If the number of tables is low enough, then all possible combinations are considered and the order does not make any difference.
    Edited by: Sven W. on Jun 1, 2011 4:00 PM

  • Tuning Select Statement . field sequence and where clause

    Hi All
    Are there any general guidelines how to write select < field sequence >where clause < field sequence ? Is that shuld be in order of the field sequence in tables?
    And how to use this when we have a view or a inner - join . Is that separate from normal select statement that is using FOR ALL ENTRIES.
    Please let me know any general guidelines available on this,
    Amol

    Hello Amol,
    I have another hint:
    The statement FOR ALL ENTRIES will package the select statements for every five entries in the internal table. So in comparison to the following code sequence...
    LOOP AT itab.
       SELECT * FROM table WHERE key = itab-key.
    ENDLOOP
    the number of select statements is reduced to 20% with
    SELECT * FROM table INTO TABLE ...
         FOR ALL ENTRIES IN itab
         WHERE key = itab-key
    If I'm expecting a <i>huge</i>  amount of data a go a step further and create my own packages by building a range table with around 100-500 entries and execute a select there...
    LOOP AT itab.
       IF counter < 500.
          APPEND itab-key TO range-tab.   " just code example
       ENDIF.
       IF count >= 500.
          SELECT * FROM table APPENDING TABLE ...
             WHERE key IN range_tab
       ENDIF.
       " adjust and calculate counter
    ENDLOOP.
    * Don't forget last select statement after loop
    Best wishes,
    Florin

  • How to change access path for 'where' clause by using HINTS?

    I searched a loooot of posts and haven't found a solution for my case. I don't even know whether it is possible or not. Is it possible to change the sequence of Oracle "Predicate Information"?
    Here is my SQL and Oracle's execution plan.
      SELECT Max(logId) AS logId FROM online_users_t
      WHERE online_users_date >= to_date('2011-09-19 10:00:00') - 3.2 AND online_users_date <= to_date('2011-09-19 10:00:00') AND online_users_result in (1, -1)
      GROUP BY online_users_user
    | Id  | Operation                    | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                    | 24800 |   629K|  1336   (1)| 00:00:17 |
    |   1 |  HASH GROUP BY               |                    | 24800 |   629K|  1336   (1)| 00:00:17 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| ONLINE_USERS_T     | 38833 |   985K|  1334   (1)| 00:00:17 |
    |*  3 |    INDEX RANGE SCAN          | ONLINE_USERS_T_IDX |   116K|       |   313   (1)| 00:00:04 |
    Predicate Information (identified by operation id):
       2 - filter("ONLINE_USERS_RESULT"=(-1) OR "ONLINE_USERS_RESULT"=1)
       3 - access("ONLINE_USERS_DATE">=TO_DATE(' 2011-09-16 05:12:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "ONLINE_USERS_DATE"<=TO_DATE(' 2011-09-19 10:00:00', 'syyyy-mm-dd
                  hh24:mi:ss'))I have 2 conditions in my 'where' clause, one is date range and the other is 'online_users_result in (1, -1)'. It seems that Oracle filter the table by using 'online_users_result in (1, -1)' first, then access it through date range.
    What I want to do is firstly filtering the table by using date range followed by other things. How can I do it?
    Any clue or help would be highly appreciated.
    Thanks in advance.

    It seems that Oracle filter the table by using 'online_users_result in (1, -1)' first, then access it through date range. No it's not.
    What I want to do is firstly filtering the table by using date range followed by other things. How can I do it?That's precisely what it's doing now.
    It is using the T_IDX index to quickly find all rows that satisfy the range predicate on the date column.
    And then filter those rows to only retrieve the ones that satisfy the other predicate (... in (1,-1)).

  • Using distinct in where clause

    Greedings,
    I am trying to execute some kind of distinct using rowid in where clause but for some reason im not getting the appropriate result. Any guidance is welcome
    SELECT acnt_code,cat,cat_desc,buc FROM so_budgets_cat where
    Trim(buc)='S03'
    and
    NOT exists (SELECT  1
                       from   so_budgets_cat tab2
                       where  (  tab2.cat     =  so_budgets_cat.cat )
                       and    tab2.ROWID  > so_budgets_cat.ROWID
    ORDER BY cat,so_budgets_cat.rowidThanks in advance

    Additionally to the fact that we don't have an idea on the expected output, I can't understand the comparison of ROWIDs in your query. These are the logical addresses where the data reside in the disks, comparing them doesn't make sense to me; Oracle DB defines where to store, based on space availability in the disk allocation to the database occupation - and NOT in a logical sequence.
    Maybe the existing row is stored in an address that is not a higher number than other, and so it is not being retrieved in your sub-query - hence your test for distinction is failing.

  • DYNAMIC WHERE CLAUSE in PROCEDURE

    I am trying to pass in the IN portion of the where clause to an update statement within a procedure and it is not updating any rows. I want to update 2 columns where the ID's are in the string of ID's I am passing in.
    PROCEDURE upd_corebio
    (p_dup_string     IN          VARCHAR2,
    p_source     IN          VARCHAR2,
    p_title          IN          VARCHAR2)
    IS
    BEGIN
    UPDATE corebio
    SET corettlbar = p_title, coresource = p_source
    WHERE coreid IN (p_dup_string);
    END upd_corebio;
    upd_corebio('1001,2002,3003','SOURCE','TITLE')
    FYI...COREID IS CHAR(10)
    CORETTLBAR IS CHAR(30)
    CORESOURCE IS CHAR(6)

    The rownum hint seems to work on my system (Windows, 9.2.0.1)
    First, we'll set up the objects
    create table collection_test (
      col1 NUMBER,
      col2 VARCHAR2(100)
    create sequence coll_seq
      start with 1
      increment by 1
      cache 100;
    begin
      for x in (select * from all_objects)
      loop
        insert into collection_test
          values( coll_seq.nextval, x.object_name );
      end loop;
    end;
    create unique index coll_test_idx
      on collection_test( col1 );
    analyze index coll_test_idx compute statistics
    analyze table collection_test compute statistics;Now, try with the "generic" approach, with the CARDINALITY hint, which won't work, and the rownum trick, which appears to work
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT *
      2    FROM collection_test
      3*  WHERE col1 IN (SELECT * FROM TABLE(CAST(f_number_table('1,2,3') as numberTable)))
    SQL> /
          COL1
    COL2
             1
    /1005bd30_LnkdConstant
             2
    /10076b23_OraCustomDatumClosur
             3
    /10297c91_SAXAttrList
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=297327 Card=1 Bytes=
              28)
       1    0   NESTED LOOPS (SEMI) (Cost=297327 Card=1 Bytes=28)
       2    1     TABLE ACCESS (FULL) OF 'COLLECTION_TEST' (Cost=19 Card=2
              7028 Bytes=756784)
       3    1     COLLECTION ITERATOR (PICKLER FETCH) OF 'F_NUMBER_TABLE'
    Statistics
            687  recursive calls
              0  db block gets
            331  consistent gets
              6  physical reads
             68  redo size
            546  bytes sent via SQL*Net to client
            503  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
             19  sorts (memory)
              0  sorts (disk)
              3  rows processed
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT *
      2    FROM collection_test
      3*  WHERE col1 IN (SELECT /*+ CARDINALITY(t 10) */ * FROM TABLE(CAST(f_number_table('1,2,3') as nu
    SQL> /
          COL1
    COL2
             1
    /1005bd30_LnkdConstant
             2
    /10076b23_OraCustomDatumClosur
             3
    /10297c91_SAXAttrList
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=297327 Card=1 Bytes=
              28)
       1    0   NESTED LOOPS (SEMI) (Cost=297327 Card=1 Bytes=28)
       2    1     TABLE ACCESS (FULL) OF 'COLLECTION_TEST' (Cost=19 Card=2
              7028 Bytes=756784)
       3    1     COLLECTION ITERATOR (PICKLER FETCH) OF 'F_NUMBER_TABLE'
    Statistics
              0  recursive calls
              0  db block gets
            177  consistent gets
              0  physical reads
              0  redo size
            546  bytes sent via SQL*Net to client
            503  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              3  rows processed
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT *
      2    FROM collection_test
      3*  WHERE col1 IN (SELECT /*+ CARDINALITY(t 10) */ * FROM TABLE(CAST(f_number_table('1,2,3') as nu
    SQL> /
          COL1
    COL2
             1
    /1005bd30_LnkdConstant
             2
    /10076b23_OraCustomDatumClosur
             3
    /10297c91_SAXAttrList
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=23 Card=10 Bytes=410
       1    0   NESTED LOOPS (Cost=23 Card=10 Bytes=410)
       2    1     VIEW OF 'VW_NSO_1' (Cost=11 Card=10 Bytes=130)
       3    2       SORT (UNIQUE)
       4    3         COUNT
       5    4           FILTER
       6    5             COLLECTION ITERATOR (PICKLER FETCH) OF 'F_NUMBER
              _TABLE'
       7    1     TABLE ACCESS (BY INDEX ROWID) OF 'COLLECTION_TEST' (Cost
              =1 Card=1 Bytes=28)
       8    7       INDEX (UNIQUE SCAN) OF 'COLL_TEST_IDX' (UNIQUE)
    Statistics
              0  recursive calls
              0  db block gets
             14  consistent gets
              0  physical reads
              0  redo size
            546  bytes sent via SQL*Net to client
            503  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              3  rows processedUnless I'm missing the boat, it seems like the last approach is using the more appropriate index access path.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Order in where clause - SQL statement

    Hi,
    The order of the fields in Where clause in OpenSQL statements is important to get the right index?
    Select a b c from t1
    where 
    d = p_d and
    e = p_e
    Or
    Select a b c from t1
    where 
    e = p_e and
    d = p_d
    Index:
    columns e and d.
    Thanks !

    HI,
      Both will give you the same result.. but it is always good to pass the sequence as in the table.. the performance will be good when you follow the sequece of occurance of the fields.
    Thanks
    Mahesh

  • Where clause one query not being pushed down

    I am having a problem where I cannot get a certain "optional" parameter to be pushed down to a query. The parameter gets applied in memory after the result set is returned but not pushed down to the DB. The function is as follows:
    declare function getFoo($key as xs:string, $optinalInput as xs:string*) as element(b:bar)*
    for $foo in f:getFoo()
    where $key = $foo/key
    where not(exists($optinalInput)) or $foo/optional = $optinalInput<- does not get pushed down to the query
    return $foo
    If I make optinalInput an xs:string instead of xs:string * and the optional parameter will get pushed to the query. The problem is for this optional parameter I could get anywhere from 0-50 in the sequence. Seems like when the parameter is a sequence it doesn't get applied to the query. Is there any way around this?

    Mike,
    I understand the difference between * and ? and I was one of the people working on the "string-length not getting pushed" problem so I am very familiar with it. I tried you solution that you mentioned below and it still did not push the where clause to the query. I know I could achieve this with an ad-hoc query but I wanted to do a pure xquery implementation of this component because of the benefits it could have when interacting with other components in our ODSI project...such as SQL joining and potentially pushing additional where clause down from components that call this component. The only way I did get this to kind of work is to do this:
    return
    for $o in $optinalInput
    for $foo in f:getFoo()
    where $key = $foo/key
    where $o = $foo/optional
    return
    $foo
    for $count in 1
    where not(exists($optinalInput))
    for $foo in f:getFoo()
    where $key = $foo/key
    return
    $foo
    By putting the optional parameter into a FOR statement above the table call it guarantees that at least one will exists and that's why the optional parameter gets pushed properly to the DB with a parameterized query. The problem with this is that even though a parameterized query gets pushed it will call the SQL statement multiple times!...not good.
    Another solution that was suggested to me would be to create the number of sequences for each item in the sequence and treat each item as it's own. For example if you know that the schema limits the sequence from 0..50 then you could make 50 items and 50 where clauses....probably not an optimal solution either but it would achieve properly pushing the where clause tot he DB.
    For now I am satisfied with this optional parameter not being pushed to the DB because the performance was still good but it would be nice if there was a maintainable pure xquery solution to this problem.
    Thanks for the help it's always appreciated!
    Mike

  • Where Clause messing up results of Query using BC4J

    Hello all.
    I am developing a hand-coded JSP application that uses BC4Js and is deployed to a 9iAS on a SPARC box.
    I'm not sure what has been happening, but the results that are printed out to the screen are vastly different from the SQL results. I've gone as far as printing the Query that is executed onto the results page and have run it on SQL*Plus -- the query works on Plus, but displays no rows on the screen.
    I have a pretty complex where clause, I compare around four columns, and while developing I noticed that the sequencing of the columns greatly affected the output.
    Is this the same case?
    Thanks for the help!

    Additional Information:
    One of the Where parameters is a date range, when I made the range narrow I was able to get the right number of rows for the result set (34 in all). But when I widened it to the day right after that, I got no results.
    I'm stumped.

  • Performance Tuning on a table where WHERE clause is having only PK columns

    Hi folks!!
    Here is the gotcha!!!!
    I am having a table, named X, with primary key columns A and B.
    I running a packaged procedure in which there is a SELECT statment to get the record from the table X with WHERE condition on A and B columns. Now the problem is, the package is taking too much amount of time to get executed.
    Eventually, I used TKPROF utility on the trace file of that package execution.
    The trace file is showing that huge amount of time is spent on the SELECT statement of table X, as I said above.
    I am baffled why it is taking that much of time eventhough the columns in the WHERE clause are Primary Key columns only and that too there are in the sequential order as that of in primary key contituent sequence.
    I would be very grateful to you guyz... plz help me out of this one....
    Cheers...........PCZ

    Also can you use preformatting as requested above, so
    that we can read it?
    [pre]Your preformatted
    text[/pre]
    Hi William,
    Plz find the requested:
    SELECT *
    FROM
    STTMS_CUST_ACCOUNT WHERE BRANCH_CODE=:B2 AND CUST_AC_NO=:B1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      180      0.00       0.04          0          0          0           0
    Execute  56538      0.96       4.02          0          0         26           0
    Fetch    56512   5581.98   19547.83         12 1134505869          6       56512
    total   113230   5582.94   19551.89         12 1134505869         32       56512
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 42  (FLEXMIG)   (recursive depth: 1)
    Rows     Row Source Operation
        325  TABLE ACCESS BY INDEX ROWID STTM_CUST_ACCOUNT (cr=6427406 pr=1 pw=0 time=327599336 us)
    10064925   INDEX RANGE SCAN IND_DORMANCY (cr=46475 pr=0 pw=0 time=15740976 us)(object id 512984)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
        325   TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                  'STTM_CUST_ACCOUNT' (TABLE)
    10064925    INDEX   MODE: ANALYZED (RANGE SCAN) OF 'IND_DORMANCY' (INDEX)
    ********************************************************************************This is what I can do. I apologize if it still does not come out in proper format. This is the first time I am trying it. :)
    Cheers.......PCZ

  • Dynamic XQuery Where clause

    I have the following schema:
    <?xml version="1.0"?>
    <xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="CountryRiskService"
    targetNamespace="CountryRiskService"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">
    <xs:element name="CountryRiskParameters">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="countryId" type="xs:int" minOccurs="1" maxOccurs="unbounded"/>
    <xs:element name="catA" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    I am passing this into my Logical Data Service, what I want to do is create a dynamic XQuery where clause if the catA field is populated, ignore it if it isn’t, so basically, I want to be able to create a dynamic query based on the parameters requested, so I have the following XQUERY:
    declare function tns:getCountries($countryRiskInput as element(ns7:CountryRiskParameters)) as element(ns0:CountryRiskInfo)* {
    for $tbl_high_risk_countries in ns1:tbl_high_risk_countries()
    where $countryRiskInput/ns4:countryId = $tbl_high_risk_countries/country_id
    where $countryRiskInput/ns4:catA = $tbl_high_risk_countries/risk_catA
    I really thought that DSP would be able to handle this on the fly since the element is optional but if I don’t populate it, I get nothing back, the idea is I want to increase the number of elements in my schema so my consumers have the ability to filter the results they want, so above, I don’t want the second where clause if catA isn't specified, any ideas how to accomplish this?

    Simply add the disjunction of the input being empty.
    for $tbl_high_risk_countries in ns1:tbl_high_risk_countries()
    where $countryRiskInput/ns4:countryId = $tbl_high_risk_countries/country_id
    where ( $countryRiskInput/ns4:catA = $tbl_high_risk_countries/risk_catA or empty( $countryRiskInput/ns4:catA )
    But suppose you have 27 different elements that you might want to filter on - the xquery gets long and ugly. You might want to looking into using FilterXQuery. Visit http://edocs.bea.com/aldsp/docs25/, search on FilterXQuery, look for the tutorial.
    If your queries get more complicated, you would do well to look into generating ad hoc queries. (edocs as well).

  • Query for Find Mode Fails-AutoGenerated WHERE clause missing quotation mark

    Using Oracle JDev 10.1.3.2. In 'Find Mode' the query execution fails.
    The error shown below is caused by the WHERE clause statement. The column name is quoted in the database but the code generated by the ADF framework does not use quotes. As a result the column name is illegal. Is there a way to hint to the ADF framework to ALWAYS use quotation marks?
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT "PLATE","WROW","WCOL","WFIELD","AVGNUC.NUC_CELL_INTENSITY","MEDNUC.NUC_CELL_INTENSITY","AVGORG.INCLUSION_BCKG_INTE","MEDORG.INCLUSION_BCKG_INTE","MEDORG.COUNT","MEDORG.SPACING","MEDORG.NEIGHBOR_COUNT" FROM ICSUMSTAS_1888_295) QRSLT WHERE ( ( (MEDORG.COUNT >0) ) )

    It is true that these are not the most column 'friendly' names, but they are what they are. In the database these columns are quoted and they must be so in order for the query to work correctly.
    The suggestion of directly manipulating the View Criteria is a good one and I have implemented a solution based on it but it's cumbersome. Here is how it works:
    First, use the default query mode UI to add new View Criteria. If you were to execute the query at this point it would fail due to the columns names not being quoted. So, instead, implemented my own execute query button that first uses the View Criteria to create a properly quoted WhereClause for the ViewObject.
    I then reset the ViewCriteria (or they will interfere with the WhereClause), set the custom constructed WhereClause on the ViewObject, and re-execute the query. The cumbersome part is that I have to create my own parser for user input to write a valid WhereClause. And when the user uses query mode again the previously set ViewCriteria have been reset (which is annoying, and not the typical query mode behavior which might confuse the user)
    below are some of my code snippets:
    * This action is triggered by clicking the FIND button on the UI.
    * It uses a combination of the ViewCriteria default UI and custom code that processes
    * user input into a whereClause for the ViewObject
    private void jbFind_actionPerformed(ActionEvent e) {
    jbAddRow.setEnabled(false);
    //reset old where clause
    System.out.println("OLD WHERE:"+myView.getWhereClause());
    myView.setWhereClause(null);
    String customWhere=getCustomWhere();
    /* The case for null and blank View Criteria is tested below
    * when there are blank ViewCriteria the sequence (--) is generated from getCustomWhere
    * Note the use of contains instead of equals
    * The use of equalIgnoreCase etc for unexplained reasons seem to fail to detect when customWhere is (--)
    if(customWhere==null||customWhere.contains("(--)")){
    return;
    }else{
    /*remove ViewCriteria because they can not handle special Column names
    * That's why we go into the trouble of creating our own find function
    myView.getViewCriteria().removeAllElements();
    myView.setWhereClause(customWhere);
    myView.executeQuery();
    jUNavigationBar1.doAction(JUNavigationBar.BUTTON_EXECUTE);
    jTable1.revalidate();
    private String getCustomWhere(){
    StringBuffer custom=new StringBuffer();
    ApplicationModule am = (ApplicationModule) panelBinding.getApplication().getDataProvider();
    DCJboDataControl jbodc = new DCJboDataControl(am);
    JUIteratorBinding iterBinding = new JUIteratorBinding(jbodc,myView );
    int criteriaCount=iterBinding.getViewCriteria().getRowCount();
    //Validation when no ViewCriteria are defined
    if (criteriaCount==0){
    System.out.println("ViewCriteria Count: "+criteriaCount);
    return null;
    }else{
    System.out.println("ViewCriteria Count: "+criteriaCount);
    int attr=iterBinding.getViewCriteria().getCurrentRow().getAttributeCount();
    int criteriaRows=iterBinding.getViewCriteria().getAllRowsInRange().length;
    String[] attrNames=iterBinding.getViewCriteria().getCurrentRow().getAttributeNames();
    for (int r=0;r<criteriaRows;r++)
    {custom.append("(");
    for (int k=0;k<attr;k++){
    if(iterBinding.getViewCriteria().getRowAtRangeIndex(r).getAttribute(k)!=null){
    custom.append("(\""+attrNames[k]+"\"");// LIKE '"+(String)iterBinding.getViewCriteria().getRowAtRangeIndex(r).getAttribute(k)+"') AND ");
    //trim white space
    String attrK=((String)iterBinding.getViewCriteria().getRowAtRangeIndex(r).getAttribute(k)).trim();
    String qual=attrK.substring(0,1);
    if(qual.equalsIgnoreCase(">")||qual.equalsIgnoreCase("<")||qual.equalsIgnoreCase("=")||qual.equalsIgnoreCase("!")){
    custom.append(" "+qual+"'"+attrK.substring(1)+"') AND " );
    }else{
    custom.append(" LIKE '"+(String)iterBinding.getViewCriteria().getRowAtRangeIndex(r).getAttribute(k)+"') AND ");
    }custom.append("--");
    custom.append(")");
    custom.append(" OR ");
    }//end criteria rows
    custom.append("--");
    //now need to remove terminal AND and OR tagged with --
    String cleanWhere=custom.toString().replaceAll("AND --","").replaceAll("OR --","");
    System.out.println("NEW CUSTOM WHERE: "+cleanWhere);
    return cleanWhere;
    }

  • Where clause for TaskLOVVO on OTL Timecard

    Hi,
    Following is the customization on our OTL timecard layout(Projects and Payroll Layout):
    ->Extended TaskLOVVO and based on a value selected in TaskLOV, i am defaulting Hours type.
    The dynamic where clause for the TaskLOVO is taken care of by the below QUALIFIER_ATTRIBUTES(Same as seeded layout)
    QUALIFIER_ATTRIBUTE14 = "HxcCuiTaskProjectId|PROJECT|Y#HxcCuiTaskProjectNumber|PROJECT-DISPLAY|Y"
    QUALIFIER_ATTRIBUTE15 = "project_id = ::HxcCuiTaskProjectId#upper(project_number) = upper(::HxcCuiTaskProjectNumber)"
    But in some scenarios the dynamic layout is not getting appended to TaskLOVO and the query behind the TaskLOV is pulling too many records.
    This issue is happening on Fridays when around 15000 employees submit the timecards, as Friday is our deadline for Timecard submission.
    I have tried different scenarios to replicate this issue in test intances but I am not able to replicate it.
    Please suggest what could be the issue and why is the whereclause is not getting appended in some scenarios.
    Thank you

    Hi,
    Thank you for your reply.
    The whoole LDT file is more than 30000 characters, which is not allowed in the post, so I have included only the lines which have customization.
    FYI: This is a Projects and Payroll layout.
    Following is my LDT file:
    # $Header: hxczzhxclayt0093.ldt 120.0 2008/02/08 09:26:10 bbayragi noship $
    # dbdrv: exec fnd bin FNDLOAD bin &phase=dat+10 checkfile:~PROD:~PATH:~FILE &ui_apps 0 Y UPLOAD @HXC:patch/115/import/hxclaytlayoutsld.lct @~PROD:~PATH/~FILE
    LANGUAGE = "US"
    LDRCONFIG = "hxclaytlayoutsld.lct 120.0"
    #Source Database seed121
    #RELEASE_NAME 12.1.0
    # -- Begin Entity Definitions --
    BEGIN HXC_LAYOUT_COMPONENTS
    "Projects Details Alternate Timecard Layout - Project"
    OWNER = "ORACLE12.1.0"
    COMPONENT_VALUE = "PROJECT"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_TIMECARD_PROJECT"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "200"
    COMPONENT_DEFINITION = "LOV"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/24"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS
    "Projects Details Alternate Timecard Layout - Project"
    OWNER = "ORACLE12.1.0"
    QUALIFIER_ATTRIBUTE_CATEGORY = "LOV"
    QUALIFIER_ATTRIBUTE1 = "ProjectLOVVO"
    QUALIFIER_ATTRIBUTE2 = "N"
    QUALIFIER_ATTRIBUTE3 = "HXC_CUI_PROJECT_DETAILS_LOV"
    QUALIFIER_ATTRIBUTE4 = "809"
    QUALIFIER_ATTRIBUTE5 = "25"
    QUALIFIER_ATTRIBUTE6 = "HxcCuiProjectDetails|PROJECT-DISPLAY|CRITERIA|N|HxcCuiProjectId|PROJECT|RESULT|N|HxcCuiProjectDetails|PROJECT-DISPLAY|RESULT|N|HxcCuiProjectCoOrgId|LOCATION1|RESULT|N|HxcCuiProjectName|CNAME|RESULT|N"
    QUALIFIER_ATTRIBUTE8 = "ProjectDetails"
    QUALIFIER_ATTRIBUTE9 = "ProjectId#NUMBER"
    QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.ProjectLOVVO"
    QUALIFIER_ATTRIBUTE11 = "RESOURCE_IDENTIFIER_ID"
    QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "PROJECTS"
    QUALIFIER_ATTRIBUTE27 = "Attribute1"
    QUALIFIER_ATTRIBUTE28 = "PROJECT"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    BEGIN HXC_LAYOUT_COMPONENTS
    "Projects Details Alternate Timecard Layout - Task"
    OWNER = "ORACLE12.1.0"
    COMPONENT_VALUE = "TASK"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_TIMECARD_TASK"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "210"
    COMPONENT_DEFINITION = "LOV"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/24"
    BEGIN HXC_LAYOUT_COMP_PROMPTS "HxcCuiTaskProjectId" "AK_PROMPT"
    OWNER = "ORACLE12.1.0"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_TIMECARD_PROJECT"
    ATTRIBUTE_APP_SHORT_NAME = "HXC"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_PROMPTS
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS
    "Projects Details Alternate Timecard Layout - Task"
    OWNER = "ORACLE12.1.0"
    QUALIFIER_ATTRIBUTE_CATEGORY = "LOV"
    QUALIFIER_ATTRIBUTE1 = "TaskLOVVO"
    QUALIFIER_ATTRIBUTE2 = "N"
    QUALIFIER_ATTRIBUTE3 = "HXC_CUI_TASK_DETAILS_LOV"
    QUALIFIER_ATTRIBUTE4 = "809"
    QUALIFIER_ATTRIBUTE5 = "10"
    QUALIFIER_ATTRIBUTE6 = "HxcCuiTaskDetails|TASK-DISPLAY|CRITERIA|N|HxcCuiTaskProjectId|PROJECT|PASSIVE_CRITERIA|Y|HxcCuiTaskId|TASK|RESULT|N|HxcCuiTaskDetails|TASK-DISPLAY|RESULT|N|HxcCuiTaskBillableFlag|EXPTYPE|RESULT|N"
    QUALIFIER_ATTRIBUTE8 = "TaskDetails"
    QUALIFIER_ATTRIBUTE9 = "TaskId#NUMBER"
    QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.TaskLOVVO"
    QUALIFIER_ATTRIBUTE11 = "RESOURCE_IDENTIFIER_ID|TIMECARD_BIND_END_DATE"
    QUALIFIER_ATTRIBUTE14 = "HxcCuiTaskProjectId|PROJECT|Y#HxcCuiTaskProjectNumber|PROJECT-DISPLAY|Y"
    QUALIFIER_ATTRIBUTE15 = "project_id = ::HxcCuiTaskProjectId#upper(project_number) = upper(::HxcCuiTaskProjectNumber)"
    QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "PROJECTS"
    QUALIFIER_ATTRIBUTE27 = "Attribute2"
    QUALIFIER_ATTRIBUTE28 = "TASK"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    BEGIN HXC_LAYOUT_COMPONENTS
    "Projects Details Alternate Timecard Layout - Location"
    OWNER = "CUSTOM"
    COMPONENT_VALUE = "LOCATION"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_CUI_LOCATION_LABEL"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "215"
    COMPONENT_DEFINITION = "CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/24"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Location"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "Custom2VO"
    QUALIFIER_ATTRIBUTE4 = "N"
    # QUALIFIER_ATTRIBUTE5 = "10"
    # QUALIFIER_ATTRIBUTE8 = "DisplayValue"
    # QUALIFIER_ATTRIBUTE9 = "Value#NUMBER"
    QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.Custom2VO"
    QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "Dummy Element Context"
    QUALIFIER_ATTRIBUTE27 = "Attribute15"
    QUALIFIER_ATTRIBUTE28 = "LOCATION1"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    BEGIN HXC_LAYOUT_COMPONENTS "Projects Details Alternate Timecard Layout - Expenditure Type"
    OWNER = "ORACLE"
    COMPONENT_VALUE = "EXPENDITURETYPE"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_TIMECARD_EXPTYPE"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "225"
    COMPONENT_DEFINITION = "PACKAGE_CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/23"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Expenditure Type"
    OWNER = "ORACLE"
    QUALIFIER_ATTRIBUTE_CATEGORY = "PACKAGE_CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "BOLINF.XXHXC_TYPE_CHOICE.EXPTTYPE"
    QUALIFIER_ATTRIBUTE2 = "@RESOURCE_IDENTIFIER_ID|@TIMECARD_BIND_END_DATE"
    QUALIFIER_ATTRIBUTE4 = "N"
    QUALIFIER_ATTRIBUTE8 = "aliasname"
    QUALIFIER_ATTRIBUTE9 = "value#NUMBER"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "R"
    QUALIFIER_ATTRIBUTE24 = "ET_EXPENDITURE_TYPE"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "OTL_ALIAS_1"
    QUALIFIER_ATTRIBUTE27 = "Attribute1"
    QUALIFIER_ATTRIBUTE28 = "EXPTYPE"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    BEGIN HXC_LAYOUT_COMPONENTS "Projects Details Alternate Timecard Layout - Customer name"
    OWNER = "ORACLE"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "XXTW_HXC_TIMECARD_CUST_NAME"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "205"
    COMPONENT_DEFINITION = "TEXT_FIELD"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/24"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Customer name"
    OWNER = "ORACLE"
    QUALIFIER_ATTRIBUTE_CATEGORY = "TEXT_FIELD"
    QUALIFIER_ATTRIBUTE1 = "N"
    QUALIFIER_ATTRIBUTE2 = "Y"
    QUALIFIER_ATTRIBUTE3 = "20"
    QUALIFIER_ATTRIBUTE4 = "1"
    QUALIFIER_ATTRIBUTE5 = "20"
    QUALIFIER_ATTRIBUTE7 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE17 = "NONE"
    QUALIFIER_ATTRIBUTE20 = "Y"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "PROJECTS"
    QUALIFIER_ATTRIBUTE27 = "Attribute9"
    QUALIFIER_ATTRIBUTE28 = "CNAME"
    QUALIFIER_ATTRIBUTE30 = "Y"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    And the query in TASKLOVVO:
    SELECT task.task_number tasknumber, task.task_name, task_details taskdetails, task.task_id taskid, bolinf.GETALIASID(proj.project_type,proj.project_id,task.task_id, :1, :2) billable_flag, task.project_id, task.start_date, task.completion_date, task.chargeable_flag, proj.project_number , proj.project_details from pa_online_tasks_v task ,pa_online_projects_v proj where proj.project_id = task.project_id
    In the above query GETALIASID is a custom function that returns a value.
    Thank you
    Edited by: Santo on Mar 18, 2013 2:12 PM

  • Derive found flag in SQL with where clause using TABLE(CAST function

    Dear All,
    Stored procedure listEmployees
    ==========================
    CREATE OR REPLACE TYPE STRING_ARRAY AS VARRAY(8000) OF VARCHAR2(15);
    empIdList STRING_ARRAY
    countriesList STRING_ARRAY
    SELECT EMP_ID, EMP_COUNTRY, EMP_NAME, FOUND_FLAG_
    FROM EMPLOYEE WHERE
    EMP_ID IN
    (SELECT * FROM TABLE(CAST(empIdList AS STRING_ARRAY))
    AND EMP_COUNTRY IN
    (SELECT * FROM TABLE(CAST(countriesList AS STRING_ARRAY))
    =================
    I have a stored procedure which lists the employees using above simple query.
    Here I am using table CAST function to find the list of employees in one go
    instead of looping through each and every employee
    Everything fine until requirements forced me to get the FOUND_FLAG as well.
    Now I wanted derive the FOUND_FLAG by using rownum, rowid, decode functions
    but I was not successful
    Can you please suggest if there is any intelligent way to say weather the
    row is found for given parameters in the where clause?
    If not I may have to loop through each set of empIdList, countriesList
    and find the values individually just to set a flag. In this approach I can’t use
    the TABLE CAST function which is efficient I suppose.
    Note that query STRING_ARRAY is an VARRAY. It is very big in size and this procedure
    suppose to handle large sets of data.
    Thanks In advance
    Regards
    Charan
    Edited by: kmcharan on 03-Dec-2009 09:55
    Edited by: kmcharan on 03-Dec-2009 09:55

    If your query returns results, you have found them... so your "FOUND" flag might be a constant,...

  • Index usage in depending on where clause changes.

    Hello Friends,
    I need your help for one issue.
    I have one query , which is using two table Say T1 and T2, where C1 is common column using which both are joined.
    C1 is primary key in T1, but no index available in T2 for C1. T1C2 is the column which we want to select.
    (Note that Either of table can be a Master table)
    Now see the query:
    Select T1C2
    From T1, T2
    where T2.C1 = T1.C1
    Here where clause may have other conditions and From clause may have others tables as per requirements.
    I want to know that, if, I change the query like following to let my query use the available index of T1.C1.
    Select T1C2
    from T1, T2
    where T1.C1 = T2.C1
    Then, Will the query use the available index of T1. and Will i get better performance. Even a little improvement in performance may help me a lot as this kind of query is being used within a where loop (so it is going to be executed multiple times).
    Please advise on this..
    Regards,
    Dipali..

    Hi,
    18:43:17 rel15_real_p>create table t1(c1 number primary key, c2 number);
    Table created.
    18:43:26 rel15_real_p>create table t2(c1 number, c2 number);
    18:45:08 rel15_real_p>
    18:45:09 rel15_real_p>begin
    18:45:09   2  for i in 1..100
    18:45:09   3  loop
    18:45:09   4        insert into t1(c1,c2) values (i,i+100);
    18:45:09   5  end loop;
    18:45:09   6  commit;
    18:45:09   7  end;
    18:45:09   8  /
    PL/SQL procedure successfully completed.
    18:45:09 rel15_real_p>
    18:45:09 rel15_real_p>
    18:45:09 rel15_real_p>begin
    18:45:09   2  for i in 1..100
    18:45:09   3  loop
    18:45:09   4        insert into t2(c1,c2) values (i,i+200);
    18:45:09   5  end loop;
    18:45:09   6  commit;
    18:45:09   7  end;
    18:45:09   8  /
    18:45:23 rel15_real_p>select count(*) from t1;
      COUNT(*)
           100
    18:45:30 rel15_real_p>select count(*) from t2;
      COUNT(*)
           100
    18:45:49 rel15_real_p>select index_name,index_type from user_indexes where table
    _name='T1';
    INDEX_NAME                     INDEX_TYPE
    SYS_C0013059                   NORMAL
    18:48:21 rel15_real_p>set autotrace on
    18:52:25 rel15_real_p>Select T1.C2
    18:52:29   2  From T1, T2
    18:52:29   3  where T2.C1 = T1.C1
    18:52:29   4  /
            C2
           101
           102
           103
           104
           105
            C2
           200
    100 rows selected.
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=7 Card=100 Bytes=
              900)
       1    0   HASH JOIN (Cost=7 Card=100 Bytes=3900)
       2    1     TABLE ACCESS (FULL) OF 'T1' (TABLE) (Cost=3 Card=100 By
              es=2600)
       3    1     TABLE ACCESS (FULL) OF 'T2' (TABLE) (Cost=3 Card=100 By
              es=1300)
    Statistics
              0  recursive calls
              0  db block gets
             21  consistent gets
              0  physical reads
              0  redo size
           1393  bytes sent via SQL*Net to client
            562  bytes received via SQL*Net from client
              8  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
            100  rows processed
    18:52:31 rel15_real_p>analyze table t1 compute statistics;
    Table analyzed.
    18:55:35 rel15_real_p>analyze table t2 compute statistics;
    18:55:38 rel15_real_p>set autotrace on
    18:55:42 rel15_real_p>Select T1.C2
    18:55:43   2  From T1, T2
    18:55:45   3  where T2.C1 = T1.C1
    18:55:46   4  /
            C2
           101
           102
           103
           104
           105
            C2
           200
    100 rows selected.
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=100 Bytes=7
              00)
       1    0   MERGE JOIN (Cost=6 Card=100 Bytes=700)
       2    1     TABLE ACCESS (BY INDEX ROWID) OF 'T1' (TABLE) (Cost=2 Ca
              rd=100 Bytes=500)
       3    2       INDEX (FULL SCAN) OF 'SYS_C0013059' (INDEX (UNIQUE)) (
              Cost=1 Card=100)
       4    1     SORT (JOIN) (Cost=4 Card=100 Bytes=200)
       5    4       TABLE ACCESS (FULL) OF 'T2' (TABLE) (Cost=3 Card=100 B
              ytes=200)
    Statistics
              1  recursive calls
              0  db block gets
             23  consistent gets
              0  physical reads
              0  redo size
           1393  bytes sent via SQL*Net to client
            562  bytes received via SQL*Net from client
              8  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
            100  rows processed
    18:56:56 rel15_real_p>Select T1.C2
    18:56:56   2  From T1, T2
    18:56:56   3  where T1.C1 = T2.C1
    18:56:58   4  /
            C2
           101
           102
           103
           104
           105
            C2
           200
    100 rows selected.
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=100 Bytes=7
              00)
       1    0   MERGE JOIN (Cost=6 Card=100 Bytes=700)
       2    1     TABLE ACCESS (BY INDEX ROWID) OF 'T1' (TABLE) (Cost=2 Ca
              rd=100 Bytes=500)
       3    2       INDEX (FULL SCAN) OF 'SYS_C0013059' (INDEX (UNIQUE)) (
              Cost=1 Card=100)
       4    1     SORT (JOIN) (Cost=4 Card=100 Bytes=200)
       5    4       TABLE ACCESS (FULL) OF 'T2' (TABLE) (Cost=3 Card=100 B
              ytes=200)
    Statistics
              1  recursive calls
              0  db block gets
             23  consistent gets
              0  physical reads
              0  redo size
           1393  bytes sent via SQL*Net to client
            562  bytes received via SQL*Net from client
              8  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
            100  rows processed- Pavan Kumar N

Maybe you are looking for

  • JSlider + Display value in a text tool tip box

    Hello, I am new to Java. I want to display the value in a text tool tip box of the JSlider as the user moves the knob . Is there any way to achieve this. I tried setting up the value of text tool tip in the stateChanged method. But that didn't helped

  • Cannot find api to implement RIDC connect WebCenter Content Server over SSL

    Hi WebCenter Content team, I find the following sample code from http://docs.oracle.com/cd/E23943_01/doc.1111/e10807/c23_ridc.htm#BJFIHEHI Example 23-6 IDC Protocol over SSL +// build a secure IDC client as cast to specific type+ IntradocClient idcCl

  • Error Inbound IDoc - Status 51

    Hi, i am new in working with SAP and I am trying to integrate an inbound IDoc type WPUBON via WE19 transaction, l solved all the issues related with ports and partner profiles(they were the first errors). But when I want to check if the process has b

  • Control a vi from a PDA through web

    Hi! i create a simple vi and i have enable the web server on my PC. I connect to my PC with a PDA with OS Pocket PC 2002 and i can view the front panel. But when i create an embedded viewing htm page, PDA load the text of the page but don't load the

  • Export without Resources

    Is it possible to export a Project to an XER-File without exporting the resources and resource assignments?<br /> KR M