Rewrite sql to avoid filter operation

Hi All,
I found below sql and some more sql's causing high CPU usage.
SELECT :B1 AS ID ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL
                             FROM ONS
                             WHERE PARENT_ID = :B1 )), 1, 1, 0) AS IP_RELATION ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL
                             FROM ONS
                             WHERE ULTIMATE_PARENT_GID = :B1 )), 1, 1, 0) AS UP_RELATION ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL FROM AFFILIATIONS WHERE AFFILIATED_ID= :B1 )), 1, 1, 0) AS AFF_RELATION ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL FROM JOINT_VENTURES WHERE JOINT_VENTURE_ID= :B1 )), 1, 1, 0) AS JV_RELATION ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL FROM SUCCESSORS WHERE SUCCESSOR_ID= :B1 )), 1, 1, 0) AS SUC_RELATION ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL FROM COUNTERPARTY WHERE CP_TAX_AUTHORITY_ID = :B1 )), 1, 1, 0) AS TAX_AUTH_RELATION ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL FROM COUNTERPARTY WHERE CP_PRIM_REGULATOR_ID = :B1 )), 1, 1, 0) AS PRIM_REG_RELATION ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL FROM ONS WHERE DUPLICATE_OF_ID = :B1 )), 1, 1, 0) AS DUP_RELATION ,
       DECODE((SELECT 1
               FROM DUAL
               WHERE EXISTS (SELECT NULL FROM ONS WHERE REG_AUTHORITY_ID = :B1 )), 1, 1, 0) AS REG_AUTH_RELATION
FROM DUAL
| Id  | Operation             | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT      |                                |       |       |     2 (100)|          |
|*  1 |  FILTER               |                                |       |       |            |          |
|   2 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|*  3 |   INDEX RANGE SCAN    | IDX_IMMEDIATE_PARENT_ID        |     1 |     3 |     2   (0)| 00:00:01 |
|*  4 |  FILTER               |                                |       |       |            |          |
|   5 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|*  6 |   INDEX RANGE SCAN    | IDX_ULTIMATE_PARENT_ID         |     2 |     4 |     2   (0)| 00:00:01 |
|*  7 |  FILTER               |                                |       |       |            |          |
|   8 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|*  9 |   INDEX FAST FULL SCAN| PK_ORG_AFFILIATED_WITH         |     1 |     7 |   294   (7)| 00:00:04 |
|* 10 |  FILTER               |                                |       |       |            |          |
|  11 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|* 12 |   INDEX FULL SCAN     | PK_ORG_JOINT_VENTURE_OF        |     1 |     7 |     3   (0)| 00:00:01 |
|* 13 |  FILTER               |                                |       |       |            |          |
|  14 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|* 15 |   INDEX FAST FULL SCAN| PK_ONS_SUCCEEDED_BY            |     1 |     7 |    79   (7)| 00:00:01 |
|* 16 |  FILTER               |                                |       |       |            |          |
|  17 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|* 18 |   INDEX RANGE SCAN    | IDX_ORG_CP_TAX_AUTHORITY_ID    |     2 |    14 |     2   (0)| 00:00:01 |
|* 19 |  FILTER               |                                |       |       |            |          |
|  20 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|* 21 |   INDEX RANGE SCAN    | IDX_ORGCP_PRIM_REGULATOR_ID    |     1 |     4 |     2   (0)| 00:00:01 |
|* 22 |  FILTER               |                                |       |       |            |          |
|  23 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|* 24 |   TABLE ACCESS FULL   | ONS                            |     1 |     2 | 27013   (4)| 00:05:25 |
|* 25 |  FILTER               |                                |       |       |            |          |
|  26 |   FAST DUAL           |                                |     1 |       |     2   (0)| 00:00:01 |
|* 27 |   TABLE ACCESS FULL   | ONS                            |     1 |     2 |   475   (3)| 00:00:06 |
|  28 |  FAST DUAL            |                                |     1 |       |     2   (0)| 00:00:01 |
Peeked Binds (identified by position):
   2 - :B1 (NUMBER, Primary=1)
   3 - :B1 (NUMBER, Primary=1)
   4 - :B1 (NUMBER, Primary=1)
   5 - :B1 (NUMBER, Primary=1)
   6 - :B1 (NUMBER, Primary=1)
   7 - :B1 (NUMBER, Primary=1)
   8 - :B1 (NUMBER, Primary=1)
   9 - :B1 (NUMBER, Primary=1)
  10 - :B1 (NUMBER, Primary=1)
Predicate Information (identified by operation id):
   1 - filter( IS NOT NULL)
   3 - access("IMMEDIATE_PARENT_ID"=:B1)
   4 - filter( IS NOT NULL)
   6 - access("ULTIMATE_PARENT_ID"=:B1)
   7 - filter( IS NOT NULL)
   9 - filter("AFFILIATED_ID"=:B1)
  10 - filter( IS NOT NULL)
  12 - access("JOINT_VENTURE_ID"=:B1)
       filter("JOINT_VENTURE_ID"=:B1)
  13 - filter( IS NOT NULL)
  15 - filter("SUCCESSOR_ID"=:B1)
  16 - filter( IS NOT NULL)
  18 - access("CP_TAX_AUTHORITY_ID"=:B1)
  19 - filter( IS NOT NULL)
  21 - access("CP_PRIM_REGULATOR_ID"=:B1)
  22 - filter( IS NOT NULL)
  24 - filter("DUPLICATE_OF_ID"=:B1)
  25 - filter( IS NOT NULL)
  27 - filter("REG_AUTHORITY_ID"=:B1)Oracle Version : 10.2.0.4 RAC 2 nodes
Is there any possibility to rewrite this sql to avoid filter operation.
Please let me know if you need any more details....

My bad..i overlooked the execution plan.
Below execution plan has been extracted from devlopment database which is exact replica of production database.
| Id  | Operation                 | Name                           | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
|*  1 |  FILTER                   |                                |      1 |        |      1 |00:00:00.72 |    8028 |   5986 |
|   2 |   FAST DUAL               |                                |      1 |      1 |      1 |00:00:00.01 |       0 |      0 |
|   3 |   PARTITION RANGE ALL     |                                |      1 |      1 |      1 |00:00:00.72 |    8028 |   5986 |
|*  4 |    TABLE ACCESS FULL      | ONS                            |      1 |      1 |      1 |00:00:00.72 |    8028 |   5986 |
|*  5 |  FILTER                   |                                |      1 |        |      1 |00:00:00.19 |       7 |      0 |
|   6 |   FAST DUAL               |                                |      1 |      1 |      1 |00:00:00.01 |       0 |      0 |
|   7 |   PX COORDINATOR          |                                |      1 |        |      1 |00:00:00.19 |       7 |      0 |
|   8 |    PX SEND QC (RANDOM)    | :TQ10000                       |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |
|   9 |     PX PARTITION RANGE ALL|                                |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |
|* 10 |      INDEX RANGE SCAN     | IDX_ULTIMATE_PARENT_ID         |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |
|* 11 |  FILTER                   |                                |      1 |        |      0 |00:00:00.11 |    1231 |      0 |
|  12 |   FAST DUAL               |                                |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |
|* 13 |   INDEX FAST FULL SCAN    | PK_ORG_AFFILIATED_WITH         |      1 |      1 |      0 |00:00:00.11 |    1231 |      0 |
|* 14 |  FILTER                   |                                |      1 |        |      0 |00:00:00.01 |       7 |      0 |
|  15 |   FAST DUAL               |                                |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |
|* 16 |   INDEX FAST FULL SCAN    | PK_ORG_JOINT_VENTURE_OF        |      1 |      1 |      0 |00:00:00.01 |       7 |      0 |
|* 17 |  FILTER                   |                                |      1 |        |      0 |00:00:00.02 |     229 |      0 |
|  18 |   FAST DUAL               |                                |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |
|* 19 |   INDEX FAST FULL SCAN    | PK_ONS_SUCCEEDED_BY            |      1 |      1 |      0 |00:00:00.02 |     229 |      0 |
|* 20 |  FILTER                   |                                |      1 |        |      1 |00:00:00.01 |       3 |      0 |
|  21 |   FAST DUAL               |                                |      1 |      1 |      1 |00:00:00.01 |       0 |      0 |
|* 22 |   INDEX RANGE SCAN        | IDX_CP_TAX_AUTHORITY_ID        |      1 |      2 |      1 |00:00:00.01 |       3 |      0 |
|* 23 |  FILTER                   |                                |      1 |        |      1 |00:00:00.01 |       3 |      0 |
|  24 |   FAST DUAL               |                                |      1 |      1 |      1 |00:00:00.01 |       0 |      0 |
|* 25 |   INDEX RANGE SCAN        | IDX_CP_PRIM_REGULATOR_ID       |      1 |      1 |      1 |00:00:00.01 |       3 |      0 |
|* 26 |  FILTER                   |                                |      1 |        |      1 |00:00:02.20 |   28923 |  21562 |
|  27 |   FAST DUAL               |                                |      1 |      1 |      1 |00:00:00.01 |       0 |      0 |
|  28 |   PARTITION RANGE ALL     |                                |      1 |      1 |      1 |00:00:02.20 |   28923 |  21562 |
|* 29 |    TABLE ACCESS FULL      | ONS                            |      1 |      1 |      1 |00:00:02.20 |   28923 |  21562 |
|* 30 |  FILTER                   |                                |      1 |        |      1 |00:00:00.01 |       4 |      5 |
|  31 |   FAST DUAL               |                                |      1 |      1 |      1 |00:00:00.01 |       0 |      0 |
|  32 |   PARTITION RANGE ALL     |                                |      1 |      1 |      1 |00:00:00.01 |       4 |      5 |
|* 33 |    TABLE ACCESS FULL      | ONS                            |      1 |      1 |      1 |00:00:00.01 |       4 |      5 |
|  34 |  FAST DUAL                |                                |      1 |      1 |      1 |00:00:00.01 |       0 |      0 |
Predicate Information (identified by operation id):
   1 - filter( IS NOT NULL)
   4 - filter("IMMEDIATE_PARENT_ID"=:B1)
   5 - filter( IS NOT NULL)
  10 - access("ULTIMATE_PARENT_ID"=:B1)
  11 - filter( IS NOT NULL)
  13 - filter("AFFILIATED_ID"=:B1)
  14 - filter( IS NOT NULL)
  16 - filter("JOINT_VENTURE_ID"=:B1)
  17 - filter( IS NOT NULL)
  19 - filter("SUCCESSOR_ID"=:B1)
  20 - filter( IS NOT NULL)
  22 - access("CP_TAX_AUTHORITY_ID"=:B1)
  23 - filter( IS NOT NULL)
  25 - access("CP_PRIM_REGULATOR_ID"=:B1)
  26 - filter( IS NOT NULL)
  29 - filter("DUPLICATE_OF_ID"=:B1)
  30 - filter( IS NOT NULL)
  33 - filter("REG_AUTHORITY_ID"=:B1)It took just 2.20 seconds, but why does it causes more CPU resource ?
We are about to plugin new module in this database, hence ONS table is partitioned, its partitioned on column PROVIDER which seperates existing and new module in to different partitions which makes easier for loading wihout affecting existing module data(We also make about to load partition local indexes to unusable state). Also this table is the parent table for about 6 child tables. So we decided to partition even child tables by adding PROVIDER column to all child tables and partition on this column. Parent-Child relationship is built upon ID column in all the tables.
All the sql's will be altered to use PROVIDER column for filtering old and new module data.
Do you think we are in right approach, I would be thankful if you can help me here for precise designing of this table.
As a side thought - and one I would have to investigate - since you have declared a number of inddexes with "case insensitive sorting" - is is possible that you could work around this idea to drop a few of the existing indexes on "lower(column)" and use case-insensitive indexes for these comparisons ?Will test it in development database, but what is the performance improvement prediction? And please let me know your suspects which claims "lower(column)" should be avoided and use case-insensitive indexes.
Anyway we are implementing Text-Index on this table and drop all the unwanted indexes.
I've written a short note on my blog about the "exists subquery" and the varying cost of the tablescane linesI am regular reader of your blog, after seeing your test case i understood the concept crystal clear. Thanks a lot....

Similar Messages

  • How do i use PL/SQL function in filter operator

    Hi,
    i want to use one pl/sql function in filter operator. how do i use it in filter condition.
    error i am getting is
    " error occured during expression validatation.
    my filter condition is
    INOUTGRP1.LAST_UPDATE_DATE > "GET_LAST_UPDATE_DATE"()
    can any one suggest me what is the problem for this error.
    Regards,
    Jyothy

    I tried and getting the same error. don't know why!!
    However, There is another way of accomplishing it.
    You can add a "Mapping Input Parameter" to your mapping and in the default value field call the function "Get_Last_Update_date". Then add the output field from this operator to the filter operator. Then edit the filter condition to replace the function call with output value from the Input parameter operator.
    This should work...

  • Rewriting SQL to avoid multiple scan of a table

    Hi,
    Is it possible to rewrite the following statement in order to avoid multiple scan of the tables:
    SELECT
    (ACT.ID_ACCES_CLIENT_TYPE * 100000) + 30024 ss_key,
    TO_CHAR(( SYSDATE ),'MM/DD/YYYY') date_key,
    30024 transtype_key,
    ACT.ID_ACCES_CLIENT_TYPE client_acces_d_sskey,
    T.ID_MODELE fonct_mobile_d_sskey,
    '0' type_mobile_key,
    1 MEMBER
    FROM ACCES_CLIENT_TYPE ACT, ACCES AC, TYPE_MODELE T
    where ACT.FLAG_ACTIF is not null
    and NVL(( ACT.DAT_FIN ),( SYSDATE ))> SYSDATE - ((3 + 0)*30)
    and AC.ID_ACCES = ACT.ID_ACCES
    and AC.FLAG_ACTIF is not null
    and T.TAC = AC.TAC_1
    AND mod(ACT.ID_ACCES_CLIENT_TYPE, 2) = 1
    union all
    SELECT
    (ACT.ID_ACCES_CLIENT_TYPE * 100000) + 30025 ss_key,
    TO_CHAR(( SYSDATE ),'MM/DD/YYYY') date_key,
    30025 transtype_key,
    ACT.ID_ACCES_CLIENT_TYPE client_acces_d_sskey,
    T.ID_MODELE fonct_mobile_d_sskey,
    '1' type_mobile_key,
    1 MEMBER
    FROM ACCES_CLIENT_TYPE ACT, ACCES AC, TYPE_MODELE T
    where ACT.FLAG_ACTIF is not null
    and NVL(( ACT.DAT_FIN ),( SYSDATE ))> SYSDATE - ((3 + 0)*30)
    and AC.ID_ACCES = ACT.ID_ACCES
    and AC.FLAG_ACTIF is not null
    and T.TAC = AC.TAC_U
    AND mod(ACT.ID_ACCES_CLIENT_TYPE, 2) = 1
    union all
    SELECT
    (ACT.ID_ACCES_CLIENT_TYPE * 100000) + 30026 ss_key,
    TO_CHAR(( SYSDATE ),'MM/DD/YYYY') date_key,
    30026 transtype_key,
    ACT.ID_ACCES_CLIENT_TYPE client_acces_d_sskey,
    T.ID_MODELE fonct_mobile_d_sskey,
    '2' type_mobile_key,
    1 MEMBER
    FROM ACCES_CLIENT_TYPE ACT, ACCES AC, TYPE_MODELE T
    where ACT.FLAG_ACTIF is not null
    and NVL(( ACT.DAT_FIN ),( SYSDATE ))> SYSDATE - ((3 + 0)*30)
    and AC.ID_ACCES = ACT.ID_ACCES
    and AC.FLAG_ACTIF is not null
    and T.TAC = AC.TACG_G
    AND mod(ACT.ID_ACCES_CLIENT_TYPE, 2) = 1
    Thanks for help

    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
    | 0 | SELECT STATEMENT | | 44028 | 2340K| 287K (67)|
    | 1 | UNION-ALL | | | | |
    |* 2 | HASH JOIN | | 15217 | 832K| 95835 (0)|
    | 3 | INDEX FAST FULL SCAN | TYPE_MODELE_IDX_003 | 23462 | 320K| 10 (0)|
    | 4 | NESTED LOOPS | | 15217 | 624K| 95817 (0)|
    |* 5 | TABLE ACCESS FULL | ACCES_CLIENT_TYPE | 13078 | 319K| 91239 (0)|
    |* 6 | TABLE ACCESS BY INDEX ROWID| ACCES | 1 | 17 | 2 (50)|
    |* 7 | INDEX UNIQUE SCAN | PK_ACCES | 1 | | |
    |* 8 | HASH JOIN | | 15079 | 824K| 95835 (0)|
    | 9 | INDEX FAST FULL SCAN | TYPE_MODELE_IDX_003 | 23462 | 320K| 10 (0)|
    | 10 | NESTED LOOPS | | 15079 | 618K| 95817 (0)|
    |* 11 | TABLE ACCESS FULL | ACCES_CLIENT_TYPE | 13078 | 319K| 91239 (0)|
    |* 12 | TABLE ACCESS BY INDEX ROWID| ACCES | 1 | 17 | 2 (50)|
    |* 13 | INDEX UNIQUE SCAN | PK_ACCES | 1 | | |
    |* 14 | HASH JOIN | | 13732 | 683K| 95834 (0)|
    | 15 | INDEX FAST FULL SCAN | TYPE_MODELE_IDX_003 | 23462 | 320K| 10 (0)|
    | 16 | NESTED LOOPS | | 13732 | 496K| 95817 (0)|
    |* 17 | TABLE ACCESS FULL | ACCES_CLIENT_TYPE | 13078 | 319K| 91239 (0)|
    |* 18 | TABLE ACCESS BY INDEX ROWID| ACCES | 1 | 12 | 2 (50)|
    |* 19 | INDEX UNIQUE SCAN | PK_ACCES | 1 | | |
    Predicate Information (identified by operation id):
    2 - access("T"."TAC"="AC"."TAC_1")
    5 - filter("ACT"."FLAG_ACTIF" IS NOT NULL AND
    NVL("ACT"."DAT_FIN",SYSDATE@!)>SYSDATE@!-90 AND MOD("ACT"."ID_ACCES_CLIENT_TYPE",2)=1)
    6 - filter("AC"."FLAG_ACTIF" IS NOT NULL AND "AC"."TAC_1" IS NOT NULL)
    7 - access("AC"."ID_ACCES"="ACT"."ID_ACCES")
    8 - access("T"."TAC"="AC"."TAC_U")
    11 - filter("ACT"."FLAG_ACTIF" IS NOT NULL AND
    NVL("ACT"."DAT_FIN",SYSDATE@!)>SYSDATE@!-90 AND MOD("ACT"."ID_ACCES_CLIENT_TYPE",2)=1)
    12 - filter("AC"."FLAG_ACTIF" IS NOT NULL AND "AC"."TAC_U" IS NOT NULL)
    13 - access("AC"."ID_ACCES"="ACT"."ID_ACCES")
    14 - access("T"."TAC"="AC"."TACG_G")
    17 - filter("ACT"."FLAG_ACTIF" IS NOT NULL AND
    NVL("ACT"."DAT_FIN",SYSDATE@!)>SYSDATE@!-90 AND MOD("ACT"."ID_ACCES_CLIENT_TYPE",2)=1)
    18 - filter("AC"."FLAG_ACTIF" IS NOT NULL AND "AC"."TACG_G" IS NOT NULL)
    19 - access("AC"."ID_ACCES"="ACT"."ID_ACCES")
    44 rows selected.

  • What is the differene between filter operation and NL semi join?

    Hi, all.
    The oracle is 10gR2 and 11gR2.
    There are differences between filter operation and HASH/MERGE semi join in processing subqueries.
    But I could not see the difference between filter operation and NL semi join?
    (the only thing I know is that filter operation has caching mechanism, but I am not sure in case of NL semi)
    What are the pros and cons of each of them?
    Thanks in advance.
    Best Regards.

    >
    The oracle is 10gR2 and 11gR2.
    >
    Those aren't 'version's. What are the 4 digit versions?
    >
    There are differences between filter operation and HASH/MERGE semi join in processing subqueries.
    >
    What are they? When you make a statement like that post the information (and links to it) that backs up your statement.
    >
    But I could not see the difference between filter operation and NL semi join?
    (the only thing I know is that filter operation has caching mechanism, but I am not sure in case of NL semi)
    >
    We can't 'see the difference' either; you didn't post anything for us to look at.
    >
    What are the pros and cons of each of them?
    >
    Each of what? Again - you need to be as specific as possible if you want specific feedback.
    Also, since you generally should not use hints in production code anyway what difference does it make what the differences are? Oracle will make the choice.
    Without anything specific to comment on about all we can do is provide several links that talk about joins and how to produce and examine them. These are all from Jonathan Lewis's Scratchpad:
    http://jonathanlewis.wordpress.com/?s=semi-join
    http://jonathanlewis.wordpress.com/2010/12/20/index-join-4/
    http://jonathanlewis.wordpress.com/2010/08/15/joins-mj/ -- merge joins
    http://jonathanlewis.wordpress.com/2010/08/10/joins-hj/ -- hash joins
    http://jonathanlewis.wordpress.com/2010/08/09/joins-nlj/ -- nested loop joings
    http://jonathanlewis.wordpress.com/2011/06/08/how-to-hint-1/ -- how to hint for joins
    Check out those articles. Pay attention to how, in each one, he doesn't just provide a text description but also provides code and explains the code.
    In other words he provides all of the specific information needed to illustrate what he is talking about. That is what you need to do if you need help with a specific topic: provide the query, plans and output that you yourself are using as the basis of your question. That lets us see EXACTLY what you are talking about.

  • SQL Expression in Filter conditon Error in OBIEE 10g

    Hi
    I am getting an error while giving the sql in the sql expression in filter conditon.
    The sql expression I am giving is:SELECT MAX("Task Runs"."Start Time") saw_4 FROM "Analysis"'
    Error:
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: {call NQSGetLevelDrillability('set variable disable_cache_hit=1; SELECT "Task"."Task Name" saw_0, "Task Runs"."Time in Seconds" saw_1, TOPN("Task Runs"."Time in Seconds", 10) saw_2, "Task Runs"."Start Time" saw_3 FROM "Analysis" WHERE "Task Runs"."Start Time" >= SELECT MAX("Task Runs"."Start Time") saw_4 FROM "Analysis"')}
    But when I individualy select start time column and check max of it the data comes fine, but if I am giving in sql expression it errors out.
    Please suggest.

    Hi Sini,
    I have tried taking the second suggestion but I get no result for that
    "Task Runs"."Start Time" -->Filter->Advanced button->Convert this in SQL->
    WHERE "Task Runs"."Start Time" >= MAX("Task Runs"."Start Time" by "Task"."Task Name")
    Here I did not understand the code Task Runs"."Start Time" by "Task"."Task Name". If possible elaborate.
    And 1st suggestion the query formed just looks the query u suggested.
    Unable to figure out what exactly is the problem.
    Try something as in with 2 queries
    http://www.cool-bi.com/Tweaks/JoinsinAnswers.php
    or else
    "Task Runs"."Start Time" -->Filter->Advanced button->Convert this in SQL->
    WHERE "Task Runs"."Start Time" >= MAX("Task Runs"."Start Time" by "Task"."Task Name")
    not sure how it works but this is other way of your sql in BI

  • Monitoring progress when performing filter operations on images

    Hi,
    I am working on Java2D and making some image filters using classes like ImageFilter etc. Now For simple filters I want to get the progress status while the filteting is in progress, so that I can show a progress bar in the GUI.
    For this I do not have much idea. I think we can use the ImageConsumer interface, so that if the class implementing that interface list itself as an image consumer with the filter operation. Here is two way I have tried implanting this:
    1st way:
    Class MyConsumer implements ImageConsumer
    int width,height;
    int percentProgress;
    Public image processImage(Image srcImage, ImageFilter filter){
    FilteredImageSource fis: new FilteredImageSource(srcImage.getSource(),filter());
    //should we do this?
    fis.addConsumer(this);
    //or this?
    srcimage.addConsumer(this)
    Image destImage = this.createImage(fis);
    return destImage;
    //implementing methods of imageConsumer
    //we get the width and height of the new destImage (or do we get the dimension of the srcImage here??)
    public void setDimensions(int width, int height){
    this.width=width;
    this.height=height;
    public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize){
    // Is this the correct way of obtaining the progress????
    progressPercent=(y*100)/height;
    //We also have empty implementation of other ImageConsumer methods after this
    --------------------------------------------------------------2nd way, let?s say we use a smooth filter and replace the processImage(..) method above with the one below (the other methods being same):
    Public image processImage(Image srcImage){
    float[] SHARPEN3x3 = {      0.f, -1.f, 0.f,
                                -1.f, 5.0f, -1.f,
                                0.f, -1.f, 0.f};
    BufferedImage dstbimg = new
                  BufferedImage(iw,ih,BufferedImage.TYPE_INT_RGB);
    Kernel kernel = new Kernel(3,3,SHARPEN3x3);
    ConvolveOp cop = new ConvolveOp(kernel,
                                    ConvolveOp.EDGE_NO_OP,
                                    null);
    //should we do this?
    dst.addConsumer(this);
    //or this?
    srcImage.addConsumer(this);
    cop.filter(srcImage,destImage);
    return destImage;
    }Now I do get a progressPercent. But when the percent is 100%, the destimage does not return, that means the operation is not yet complete.
    So is this the correctw ay, or is there any other way to know the progress of the flter operation.
    Also I extended the ImageFilter class and overrode its setPixel method as:
    public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize){
    int progressPercent=(y*100)/height;
    System.out.println("progress in image filter:"+progressPercent);
    //I simply print out the progress and let the super perform the filter operation
    super.setPixels(x, y,w, h, model, pixels, off, scansize);
    //should I do this below? This calls the imageconsumer's setpixels
    //that I implement in the MyConsumer class
    consumer. setPixels(x, y,w, h, model, pixels, off, scansize);
    }I observe that the setPixel method of MyImageFilter is called several times even for the same scan lines, and even after percentProgress is 100%, the process runs again for 2-4 times. So the filtering operation scans the lines several times to finally perform the filtering, and as such the percentProgress is incorrect.
    Can anybody guide me. Is this approach okay and needs to be modified a bit, or there is a different approach to obtain the progress from a filter operation?
    I would finally want the same progress from other operations like LookupOp, ConvolveOp, AffineTransformOp, ColorConvertOp, RescaleOp.
    Thanks in advance
    Tanveer
    DrLaszloJamf, are you there? I am sure you are one of them who can help me in this.
    anyone can send me a private message too at [email protected]

    Please somebody let me know how to get the progress of imagefilter operation using convolveOp.filter(...) or Filteredimagesource. I waant to display the progress i a JProgressbar.

  • How to use filter operator with ROWNUM

    I would like to add filter operator in my mapping with ROWNUM to reduce the ETL loading time during testing to ensure mapping is working, but I don't know how, please help provide me some guideline. Thank you.

    what is your owb version?
    Starting with Oracle Warehouse Builder 10.2.0.3, you can use the pseudocolumns ROWID and ROWNUM in mappings. The ROWNUM pseudocolumn returns a number indicating the order in which a row was selected from a table. The ROWID pseudocolumn returns the rowid (binary address) of a row in a database table.
    You can use the ROWID and ROWNUM pseudocolumns in Table, View, and Materialized View operators in a mapping. These operators contain an additional column called COLUMN USAGE that is used to identify attributes used as ROWID or ROWNUM. For normal attributes, this column defaults to TABLE USAGE. To use an attribute for ROWID or ROWNUM values, set the COLUMN USAGE to ROWID or ROWNUM respectively.
    You can map a ROWID column to any attribute of data type ROWID, UROWID, or VARCHAR2. You can map ROWNUM column to an attribute of data type NUMBER or to any other data type that allows implicit conversion from NUMBER.
    Note that ROWID and ROWNUM pseudocolumns are not displayed in the Data Object Editor since they are not real columns.
    Edited by: Darthvader-647181 on Oct 29, 2008 9:18 AM

  • Upgrade OM 2012 to SP1 Beta - Version of SQL Server for the Operational Database and the Data Warehouse

    Hello,
    When I try to verify the prerequisites to upgrade my SCOM 2012 UR2 Platform to SP1 Beta, I have these errors :
    The installed version of SQL Server is not supported for the operational database.
    The installed version of SQL Server is not supported for the data warehouse.
    But when I execute this query Select @@version on my MSSQL Instance, the result is :
    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)   Jun 17 2011 00:54:03   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) (Hypervisor) 
    But
    here, we can see that :
    Microsoft SQL Server: SQL Server SQL 2008 R2 SP1, SQL Server 2008 R2 SP2, SQL Server 2012, SQL Server 2012 SP1, are supported.
    Do I need to pach my MSSQL Server with a specific cumulative update package ?
    Thanks.

    These are the requirements for your SQL:
    SQL Server 2008 and SQL Server 2012 are available in both Standard and Enterprise editions. Operations Manager will function with both editions.
    Operations Manager does not support hosting its databases or SQL Server Reporting Services on a 32-bit edition of SQL Server.
    Using a different version of SQL Server for different Operations Manager features is not supported. The same version should be used for all features.
    SQL Server collation settings for all databases must be one of the following: SQL_Latin1_General_CP1_CI_AS, French_CI_AS, Cyrillic_General_CI_AS, Chinese_PRC_CI_AS, Japanese_CI_AS, Traditional_Spanish_CI_AS, or Latin1_General_CI_AS.  No other collation
    settings are supported.
    The SQL Server Agent service must be started, and the startup type must be set to automatic.
    Side-by-side installation of System Center Operations Manager 2007 R2 reporting and System Center 2012 Service Pack 1 (SP1), Operations Manager reporting on the same server is not supported.
    The db_owner role for the operational database must be a domain account. If you set the SQL Server Authentication to Mixed mode, and then try to add a local SQL Server login on the operational database, the Data Access service will not be able to start.
    For information about how to resolve the issue, see
    System Center Data Access Service Start Up Failure Due to SQL Configuration Change
    If you plan to use the Network Monitoring features of System Center 2012 – Operations Manager, you should move the tempdb database to a separate disk that has multiple spindles. For more information, see
    tempdb Database.
    http://technet.microsoft.com/en-us/library/jj656654.aspx#BKMK_RBF_OperationsDatabase
    Check the SQL server agent service and see whether it is set to automatic AND started. This got me confused at my first SP1 install as well. This is not done by default...
    It's doing common things uncommonly well that brings succes.

  • NO 11g "Manage Filters" Online Layout "OR" filter operator!?

    Hey guys,
    I realize this is a totally n00b question about the BIP 11.1.1.5 Online Layout editor (for Interactive layout mode). I've created a complex P&L financial statement report in BIP using a Word RTF template, and I'd like to try to retool it into the online layout editor for possibly easier maintainability.
    But I'm coming up against what looks like a fundamental limitation and problem to me in the online layout editor. I'd like to create either a Repeating Section object or a Data Table object that will display values if a few certain values are found in the data. So, I want my filter to do something like this (to display the section or table):
    If Group = 'ABC'
    If Group = 'XYZ'
    Problem is, in my "Manage Filters" window, I need to be able to supply an "OR" filter operator between those two lines! It's an implicit "AND" operator between them apparently.
    I would gladly use an "IN" operator instead of "=" if it existed, but alas, I don't see that option either in my Manage Filters controls.
    Has anyone else come up against this in the 11g online layout editor for interactive mode output? Am I missing something totally obvious here that's right under my nose and I just can't seem to see it or find it?
    Thanks,
    Jeremy

    Hi BIPuser,
    Thanks so much for the reply; sorry for the delay in getting back to you. I believe you are referring to the group filter functionality on the data model itself, correct? If so, that's a good thought and maybe I can use that approach, but it means I would have to potentially break up my "master" data set into many, many copies to get this "OR" like functionality.
    For example, suppose I had 26 groups, groups A-Z that I wanted to show together in different report sections in my final layout. So I want A&B, C&D, E&F, etc. Instead of having one master data set with report-level grouping that way, I guess I'd have to break my data model into 13 different data sets, each one group filtered for A&B, C&D, E&F, etc, right?
    That approach seems to involve a lot more setup and data set maintenance, when all I really want is just an "OR" ability in the report layout designer itself. Something exactly like OBIEE provides in the filter section in the Criteria tab of a BI Analysis (when developing a query there).
    Now that I say that, maybe I can extend my OBIEE BI Analysis (I'm using that as the basis for my source), and perhaps I could create a new A&B, C&D, etc grouping column there to "bucket" my data together into a single data group to work around the online layout limitation of not having an "OR" filter operator available. Or, like you mentioned, I could even use the "Add Element by Expression" option in the data model itself if I wanted to manage it from there instead of OBIEE.
    I still say it would be easier if they would just give us a filter "OR" ability in the "Manage Filters" dialog in the layout editor. :)
    Thanks again BIPuser!
    Jeremy

  • Avoid Distinct operation

    Hi..
    How to avoid distinct operation in table view reports
    In my database data are
    id__Name__Salary
    01_aaaaa__1000
    01_aaaaa__1000
    01_aaaaa__1000
    02_aaaaa__1000
    02_aaaaa__1000
    My output
    01_aaaaa__1000
    02_aaaaa__1000
    but I need
    id__Name__Salary
    01_aaaaa__1000
    01_aaaaa__1000
    01_aaaaa__1000
    02_aaaaa__1000
    02_aaaaa__1000

    This may help, see the answer:
    Re: OBIEE using distinct
    Have you got ID in the table that is unique?
    Regards
    Goran
    http://108obiee.blogspot.com

  • Reg:filter operator in is not like

    hi,
    can anyone tell how does the filter operator "is not like pattern" function in obiee answers?in what scenarios this operator might be used/
    thanks

    Hi,
    Filter:
    Its used to filter data from report.We apply filter on report as prompted to make prompt effective.
    Example :
    ColumnA is prompt then we apply filter is not like ('India','Singapore') then the report will display expect india and singapore country in the output the report as ColumnA is prompted
    Filters can be apllied on report in many with diff operators like not equal In order to select values dynamicaly from report and filter data from report we use prompt.
    Prompt - Its used to select specific values to be filtered from the report
    Thanks
    Deva

  • SQL Full-text filter daemon launcher service

    Hi, 
    What is the user SQL Full-text filter daemon launcher service if in case we can stop the service what will happen.
    Can you please give me the clear picture of this SQL Full-text filter daemon launcher service.
    kindly give me the ANSWER....

    Please refer the below links:
    This topic describes how to set the service account for the
    SQL Full-text Filter Daemon Launcher service (MSSQLFDLauncher) by using the SQL Server Configuration Manager. The SQL Full-text Filter Daemon Launcher service is used by full-text search ssNoVersionto start the filter daemon host process,
    which handles full-text search filtering and word breaking. This service must be running to use full-text search.
    Ref:
    http://technet.microsoft.com/en-us/library/ms345189.aspx
    http://technet.microsoft.com/en-us/library/ms142571.aspx

  • How to use aggregator with filter  operator

    Hi,
    how can i use aggregation with filter operator. i have a table, form this table i have to calculate this valurs
    1. no of notes
    2. no of open notes where attribute =y (logic for one notes is count(notes) where attribute =y)
    2. no of closed notes where attribute =n
    for this i used like this
    table --> two filter operators 1 is for attribute =y and one is for attribute=n ----> to aggregaror operator. --- i am getting error.
    Regards,
    Jyothy

    Jyothy,
    Try this..
    U can use the below code in the aggregator without filters
    sum(decode(notes,'y',1,0) adn sum(decode(notes,'n',1,0)
    Regards,
    Sivarama

  • Error using filter operator

    Hi
    I am working in a mapping that has a text file as input and a table as output, and I want to insert a filter between them, so I dragged the filter operator to the screen.
    But when I try to connect the input file to the filter (dragging the file operator group or any field to the INOUTGRP1 filter group) it gives me a "API402 - Invalid character" error message.
    What can be the problem?
    Thanks!
    lc

    Luis,
    I have just tried your scenario in the newest version of Warehouse Builder (9.0.3.35.0) and I can create a mapping like this:
    FILE --- Filter --- TARGETTABLE
    My filter condition is on C1 (C1 = 1) which is used in the WHEN clause
    When generating this is the result:
    PTIONS ( DIRECT=TRUE,PARALLEL=FALSE, ERRORS=50, BINDSIZE=50000, ROWS=200, READSIZE=65536)
    LOAD DATA
    CHARACTERSET WE8MSWIN1252
    INFILE 'c:\XWeek\SourceFiles\Order_status_list.txt'
    READBUFFERS 4
    INTO TABLE "MYTAB"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    WHEN
    "C1" = 1
    FIELDS
    TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    "C1" POSITION (1) CHAR ,
    "C2" CHAR
    Which version of Warehouse Builder are you using?
    Thanks,
    Jean-Pierre

  • SQL in reports filter expression

    Hi All,
    I want to filter the report using the 'in' operator and specify a SQL as the expression. I want apex to be use the result of the query as the list of values for the 'in' operator. Is this supported?
    for example can I specify the filter as 'user_name in (select name from user_name_tab where group_id = 10)'
    Thanks
    Edited by: vmedi on Jan 3, 2012 2:53 PM
    Edited by: vmedi on Jan 3, 2012 2:53 PM

    Hi Micek,
    Thanks for your quick reaction.
    Yes you are right the ChosenValues will be replaced by presentation-variables in the final dashboard,
    I just am testing it with constant values in the Answers module.
    The problem seems to be that it is not allowed to use a sub-query in the filter expression.
    The Answers web application says there is a syntax problem near <select>, while I expect the SQL to be valid.
    I guess not all regular SQL is allowed in filter expressions.
    And since the report does not try to fetch data, no log of a generated, real SQL is written to the logfile.
    I need some alternative for the subquery, but one that is allowed in the filter expression.
    The problem is based on the fact that the user chooses a different value then the one that is filtered on.
    The timePeriods represent just one startDate, but I cannot use timePeriod itself to filter on.
    Because I need a between value, wich does not make sense for a timePeriod element
    such as '01-08' or 'JAN-08'.
    Several timePeriod notations are used, so using SubString and || to calculate a numeric value from the timePeriod varchar2 is not a good option.
    The error says:      
    Error getting drill information: SELECT "....
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    Any input is welcome
    kind regards

Maybe you are looking for

  • Video freezing while watching tv shows bought on I tunes.

    The video is freezing while watching tv shows bought on Itunes. The sound plays on. This just started. I rebooted and same problem. ???

  • Servlet failed with Exception  java.lang.OutOfMemoryError: PermGen space

    Hello, I recently installed BI Apps 11.1.1.7.1 on Oracle Linux 64. while i am trying to run the full load i.e. SDE, SILOS and PLP and sometimes while trying to access BIA Configuration Manager..I get below error. while i tried to increase the heap si

  • Annotation Processing Error - Run vs Debug

    Hello, I'm trying to run the Converter Example (Chapter 21 of the Sun's JavaEE 5 Tutorial) with a difference: I've deleted the Enterprise application ("Converter") and I'm using the packages alone: one for the EJB (Converter-ejb) and the second is th

  • Trying to install Leopard...

    Hi there, I just bought a new macbook 13" so decided to give my older iMac G5 to my sister for christmas and at the same time to update it to Leopard. Since the iMac was unable to read from Leopard's double-layer dvd, I decided to try installing it f

  • Not running in background

    How to check whether the pgm is running in background? I have a production Issue :      A Z-Pgm is not running in background.