Different optimizer paths between two identical databases

Hello!
I'm running into a problem with a query that is pretty amazing.  I have two different databases that I work with - Development and Acceptance.  According to my DBA, they are absolutely identical in every respect - including data.  Both of them gather statistics every night at the same time.
On development my query executes beautifully - 0.6 seconds.
On acceptance the query executes in 60 - 70 seconds.
They both evalute completely differently thought an explain plan - obviously from the difference in performance.  Here are the two explain plans for the query...
GOOD
explain plan for
select e.employee_name,
       e.worker_id       id,
       e.vac_ent         "Vac<BR>Ent",
       e.vac_taken       "Vac<BR>Taken",
       e.vac_presched    "Vac<BR>PreSched",
       e.vac_remain      "Vac<BR>Remain",
       e.banked_hours    "Banked<BR>Hours",
       e.banked_taken    "Banked<BR>Hours<BR>Taken",
       e.banked_presched "Banked<BR>Hours<BR>Presched",
       e.banked_remain   "Banked<BR>Hours<BR>Remain",
       e.edo_earned      "EDO<BR>Hours<BR>Earned",
       e.edo_taken       "EDO<BR>Hours<BR>Taken",
       e.edo_presched    "EDO<BR>Hours<BR>Presched",
       e.edo_remain      "EDO<BR>Hours<BR>Remain",
       e.ado_earned      "ADO<BR>Hours<BR>Earned",
       e.ado_taken       "ADO<BR>Hours<BR>Taken",
       e.ado_presched    "ADO<BR>Hours<BR>Presched",
       e.ado_remain      "ADO<BR>Hours<BR>Remain"
  from tas.benefit_summary_curr_year_v e /* USESYSDATEFORSECURITY */
where 1 = 1
   and (e.worker_id in
       (select worker_id
           from worker_cost_centre_v ecc2
          where ecc2.cost_centre = '100033'
            and ((ecc2.effective_date <= dtutil.todate('2013/10/08') and
                ecc2.expiration_date >= dtutil.todate('2013/10/08')) or
                (ecc2.effective_date <= dtutil.todate('2013/11/08') and
                ecc2.expiration_date >= dtutil.todate('2013/11/08')) or
                (ecc2.effective_date >= dtutil.todate('2013/10/08') and
                ecc2.expiration_date <= dtutil.todate('2013/11/08')))))
   and pkg_taw_security.user_worker_access('CA17062',
                                           'TIMEKEEPER',
                                           e.worker_id,
                                           trunc(sysdate)) = 1
union
select 'ZZZTOTALS',
       sum(e.vac_ent),
       sum(e.vac_taken),
       sum(e.vac_presched),
       sum(vac_remain),
       sum(e.banked_hours),
       sum(e.banked_taken),
       sum(e.banked_presched),
       sum(e.banked_remain),
       sum(e.edo_earned),
       sum(e.edo_taken),
       sum(e.edo_presched),
       sum(e.edo_remain),
       sum(e.ado_earned),
       sum(e.ado_taken),
       sum(e.ado_presched),
       sum(e.ado_remain)
  from tas.benefit_summary_curr_year_v e
where 1 = 1
   and (e.worker_id in
       (select worker_id
           from worker_cost_centre_v ecc2
          where ecc2.cost_centre = '100033'
            and ((ecc2.effective_date <= dtutil.todate('2013/10/08') and
                ecc2.expiration_date >= dtutil.todate('2013/10/08')) or
                (ecc2.effective_date <= dtutil.todate('2013/11/08') and
                ecc2.expiration_date >= dtutil.todate('2013/11/08')) or
                (ecc2.effective_date >= dtutil.todate('2013/10/08') and
                ecc2.expiration_date <= dtutil.todate('2013/11/08')))))
   and pkg_taw_security.user_worker_access('CA17062',
                                           'TIMEKEEPER',
                                           e.worker_id,
                                           trunc(sysdate)) = 1
order by 1;
select * from table(dbms_xplan.display);
GOOD PLAN_TABLE_OUTPUT
Plan hash value: 432971565
| Id  | Operation                            | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT                     |                        |     2 |   274 |    14  (43)| 00:00:01 |
|   1 |  SORT UNIQUE                         |                        |     2 |   274 |    13  (70)| 00:00:01 |
|   2 |   UNION-ALL                          |                        |       |       |            |          |
|   3 |    HASH GROUP BY                     |                        |     1 |    66 |     6  (34)| 00:00:01 |
|   4 |     NESTED LOOPS                     |                        |       |       |            |          |
|   5 |      NESTED LOOPS                    |                        |     1 |    66 |     4   (0)| 00:00:01 |
|   6 |       NESTED LOOPS                   |                        |     1 |    44 |     3   (0)| 00:00:01 |
|*  7 |        TABLE ACCESS BY INDEX ROWID   | WORKER_COST_CENTRE_TBL |     1 |    29 |     2   (0)| 00:00:01 |
|*  8 |         INDEX RANGE SCAN             | WORKER_CC_CC_IDX       |    29 |       |     1   (0)| 00:00:01 |
|*  9 |        INDEX RANGE SCAN              | BENEFIT_IND            |     1 |    15 |     1   (0)| 00:00:01 |
|* 10 |       INDEX UNIQUE SCAN              | WORKER_PK              |     1 |       |     1   (0)| 00:00:01 |
|  11 |      TABLE ACCESS BY INDEX ROWID     | WORKER_TBL             |     1 |    22 |     1   (0)| 00:00:01 |
|  12 |    SORT AGGREGATE                    |                        |     1 |   208 |     7  (43)| 00:00:01 |
|  13 |     VIEW                             | VM_NWVW_0              |     1 |   208 |     6  (34)| 00:00:01 |
|  14 |      HASH GROUP BY                   |                        |     1 |    66 |     6  (34)| 00:00:01 |
|  15 |       NESTED LOOPS                   |                        |       |       |            |          |
|  16 |        NESTED LOOPS                  |                        |     1 |    66 |     5  (20)| 00:00:01 |
|  17 |         NESTED LOOPS                 |                        |     1 |    44 |     4  (25)| 00:00:01 |
|  18 |          SORT UNIQUE                 |                        |     1 |    29 |     2   (0)| 00:00:01 |
|* 19 |           TABLE ACCESS BY INDEX ROWID| WORKER_COST_CENTRE_TBL |     1 |    29 |     2   (0)| 00:00:01 |
|* 20 |            INDEX RANGE SCAN          | WORKER_CC_CC_IDX       |    29 |       |     1   (0)| 00:00:01 |
|* 21 |          INDEX RANGE SCAN            | BENEFIT_IND            |     1 |    15 |     1   (0)| 00:00:01 |
|* 22 |         INDEX UNIQUE SCAN            | WORKER_PK              |     1 |       |     1   (0)| 00:00:01 |
|  23 |        TABLE ACCESS BY INDEX ROWID   | WORKER_TBL             |     1 |    22 |     1   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   7 - filter("X"."EFFECTIVE_DATE"<="DTUTIL"."TODATE"('2013/10/08') AND
              "X"."EXPIRATION_DATE">="DTUTIL"."TODATE"('2013/10/08') OR
              "X"."EFFECTIVE_DATE"<="DTUTIL"."TODATE"('2013/11/08') AND
              "X"."EXPIRATION_DATE">="DTUTIL"."TODATE"('2013/11/08') OR
              "X"."EFFECTIVE_DATE">="DTUTIL"."TODATE"('2013/10/08') AND
              "X"."EXPIRATION_DATE"<="DTUTIL"."TODATE"('2013/11/08'))
   8 - access("X"."COST_CENTRE"='100033')
   9 - access("X"."WORKER_ID"="X"."WORKER_ID")
       filter(TO_CHAR(INTERNAL_FUNCTION("X"."ACTIVITY_DATE"),'YYYY')>=TO_CHAR(SYSDATE@!,'YYYY') AND
              "PKG_TAW_SECURITY"."USER_WORKER_ACCESS"('CA17062','TIMEKEEPER',"X"."WORKER_ID",TRUNC(SYSDATE@!))=1)
  10 - access("X"."WORKER_ID"="X"."WORKER_ID")
  19 - filter("X"."EFFECTIVE_DATE"<="DTUTIL"."TODATE"('2013/10/08') AND
              "X"."EXPIRATION_DATE">="DTUTIL"."TODATE"('2013/10/08') OR
              "X"."EFFECTIVE_DATE"<="DTUTIL"."TODATE"('2013/11/08') AND
              "X"."EXPIRATION_DATE">="DTUTIL"."TODATE"('2013/11/08') OR
              "X"."EFFECTIVE_DATE">="DTUTIL"."TODATE"('2013/10/08') AND
              "X"."EXPIRATION_DATE"<="DTUTIL"."TODATE"('2013/11/08'))
  20 - access("X"."COST_CENTRE"='100033')
  21 - access("X"."WORKER_ID"="X"."WORKER_ID")
       filter(TO_CHAR(INTERNAL_FUNCTION("X"."ACTIVITY_DATE"),'YYYY')>=TO_CHAR(SYSDATE@!,'YYYY') AND
              "PKG_TAW_SECURITY"."USER_WORKER_ACCESS"('CA17062','TIMEKEEPER',"X"."WORKER_ID",TRUNC(SYSDATE@!))=1)
  22 - access("X"."WORKER_ID"="X"."WORKER_ID")
The bad plan - based off the same query but run against a different database.
Bad PLAN_TABLE_OUTPUT
Plan hash value: 3742309457
| Id  | Operation                        | Name                        | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT                 |                             |     4 |  1158 |       | 10065   (2)| 00:02:01 |
|   1 |  SORT UNIQUE                     |                             |     4 |  1158 |       | 10064  (51)| 00:02:01 |
|   2 |   UNION-ALL                      |                             |       |       |       |            |          |
|*  3 |    HASH JOIN                     |                             |     3 |   915 |       |  5031   (2)| 00:01:01 |
|   4 |     JOIN FILTER CREATE           | :BF0000                     |     1 |    29 |       |     2   (0)| 00:00:01 |
|*  5 |      TABLE ACCESS BY INDEX ROWID | WORKER_COST_CENTRE_TBL      |     1 |    29 |       |     2   (0)| 00:00:01 |
|*  6 |       INDEX RANGE SCAN           | WORKER_CC_CC_IDX            |    28 |       |       |     1   (0)| 00:00:01 |
|*  7 |     VIEW                         | BENEFIT_SUMMARY_CURR_YEAR_V |   204K|    53M|       |  5027   (1)| 00:01:01 |
|   8 |      HASH GROUP BY               |                             |   204K|  7403K|  9656K|  5027   (1)| 00:01:01 |
|   9 |       JOIN FILTER USE            | :BF0000                     |   204K|  7403K|       |  3040   (2)| 00:00:37 |
|* 10 |        HASH JOIN                 |                             |   204K|  7403K|  5392K|  3040   (2)| 00:00:37 |
|  11 |         TABLE ACCESS FULL        | WORKER_TBL                  |   162K|  3485K|       |   584   (1)| 00:00:08 |
|* 12 |         INDEX FULL SCAN          | BENEFIT_IND                 |   204K|  3001K|       |  1927   (2)| 00:00:24 |
|  13 |    SORT AGGREGATE                |                             |     1 |   243 |       |  5032   (2)| 00:01:01 |
|* 14 |     HASH JOIN RIGHT SEMI         |                             |    16 |  3888 |       |  5031   (2)| 00:01:01 |
|  15 |      JOIN FILTER CREATE          | :BF0001                     |     1 |    29 |       |     2   (0)| 00:00:01 |
|* 16 |       TABLE ACCESS BY INDEX ROWID| WORKER_COST_CENTRE_TBL      |     1 |    29 |       |     2   (0)| 00:00:01 |
|* 17 |        INDEX RANGE SCAN          | WORKER_CC_CC_IDX            |    28 |       |       |     1   (0)| 00:00:01 |
|* 18 |      VIEW                        | BENEFIT_SUMMARY_CURR_YEAR_V |   204K|    41M|       |  5027   (1)| 00:01:01 |
|  19 |       HASH GROUP BY              |                             |   204K|  7403K|  9656K|  5027   (1)| 00:01:01 |
|  20 |        JOIN FILTER USE           | :BF0001                     |   204K|  7403K|       |  3040   (2)| 00:00:37 |
|* 21 |         HASH JOIN                |                             |   204K|  7403K|  5392K|  3040   (2)| 00:00:37 |
|  22 |          TABLE ACCESS FULL       | WORKER_TBL                  |   162K|  3485K|       |   584   (1)| 00:00:08 |
|* 23 |          INDEX FULL SCAN         | BENEFIT_IND                 |   204K|  3001K|       |  1927   (2)| 00:00:24 |
Predicate Information (identified by operation id):
   3 - access("E"."WORKER_ID"="X"."WORKER_ID")
   5 - filter("X"."EFFECTIVE_DATE"<="DTUTIL"."TODATE"('2013/10/08') AND
              "X"."EXPIRATION_DATE">="DTUTIL"."TODATE"('2013/10/08') OR "X"."EFFECTIVE_DATE"<="DTUTIL"."TODATE"('2013/11/08')
              AND "X"."EXPIRATION_DATE">="DTUTIL"."TODATE"('2013/11/08') OR
              "X"."EFFECTIVE_DATE">="DTUTIL"."TODATE"('2013/10/08') AND
              "X"."EXPIRATION_DATE"<="DTUTIL"."TODATE"('2013/11/08'))
   6 - access("X"."COST_CENTRE"='100033')
   7 - filter("PKG_TAW_SECURITY"."USER_WORKER_ACCESS"('CA17062','TIMEKEEPER',"E"."WORKER_ID",TRUNC(SYSDATE@!))=1
  10 - access("X"."WORKER_ID"="X"."WORKER_ID")
  12 - filter(TO_CHAR(INTERNAL_FUNCTION("X"."ACTIVITY_DATE"),'YYYY')>=TO_CHAR(SYSDATE@!,'YYYY'))
  14 - access("E"."WORKER_ID"="X"."WORKER_ID")
  16 - filter("X"."EFFECTIVE_DATE"<="DTUTIL"."TODATE"('2013/10/08') AND
              "X"."EXPIRATION_DATE">="DTUTIL"."TODATE"('2013/10/08') OR "X"."EFFECTIVE_DATE"<="DTUTIL"."TODATE"('2013/11/08')
              AND "X"."EXPIRATION_DATE">="DTUTIL"."TODATE"('2013/11/08') OR
              "X"."EFFECTIVE_DATE">="DTUTIL"."TODATE"('2013/10/08') AND
              "X"."EXPIRATION_DATE"<="DTUTIL"."TODATE"('2013/11/08'))
  17 - access("X"."COST_CENTRE"='100033')
  18 - filter("PKG_TAW_SECURITY"."USER_WORKER_ACCESS"('CA17062','TIMEKEEPER',"E"."WORKER_ID",TRUNC(SYSDATE@!))=1
  21 - access("X"."WORKER_ID"="X"."WORKER_ID")
  23 - filter(TO_CHAR(INTERNAL_FUNCTION("X"."ACTIVITY_DATE"),'YYYY')>=TO_CHAR(SYSDATE@!,'YYYY'))
So I can definitely tune the query to work against my acceptance database - that isn't really the problem.  The problem is that I can't count on the optimizations to be the same between development and acceptance.  So if I move this to production, how do I know I don't get a third plan?!?!?
Can anyone suggest anything that might cause what I'm seeing above - and / or anything that I can do to prevent it.  This is just one query out of 10,000 or so that I'm working with - we are migrating from Oracle 9 to 11g and the queries all worked perfectly on 9.
Thanks in Advance!
Cory Aston

Here are the two plans for the simplified query - using the OUTLINE format as per your request
This is the bad plan from acceptance.
PLAN_TABLE_OUTPUT
SQL_ID  3zfrdhqpqk1mw, child number 1
select /*+ gather_plan_statistics */        w.worker_id, w.worker_name
from worker_v                   w,        worker_cost_centre_v       c
where w.worker_id = c.worker_id    and c.effective_date <=
trunc(sysdate)    and c.expiration_date >= trunc(sysdate)    and
c.cost_centre = '100033'    and pkg_taw_security.user_worker_access('CA1
7062',                                            'TIMEKEEPER',
                                   w.worker_id,
                   trunc(sysdate)) = 1  order by w.worker_name
Plan hash value: 1726112176
| Id  | Operation                      | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT               |                        |       |       |   589 (100)|          |
|   1 |  SORT ORDER BY                 |                        |     4 |   400 |   589   (2)| 00:00:08 |
|*  2 |   HASH JOIN                    |                        |     4 |   400 |   588   (1)| 00:00:08 |
|   3 |    VIEW                        | WORKER_COST_CENTRE_V   |     4 |   124 |     2   (0)| 00:00:01 |
|*  4 |     TABLE ACCESS BY INDEX ROWID| WORKER_COST_CENTRE_TBL |     4 |   116 |     2   (0)| 00:00:01 |
|*  5 |      INDEX RANGE SCAN          | WORKER_CC_CC_IDX       |    28 |       |     1   (0)| 00:00:01 |
|*  6 |    VIEW                        | WORKER_V               |   162K|    10M|   584   (1)| 00:00:08 |
|   7 |     TABLE ACCESS FULL          | WORKER_TBL             |   162K|  3485K|   584   (1)| 00:00:08 |
Outline Data
  /*+
      BEGIN_OUTLINE_DATA
      IGNORE_OPTIM_EMBEDDED_HINTS
      OPTIMIZER_FEATURES_ENABLE('11.2.0.3')
      DB_VERSION('11.2.0.3')
      OPT_PARAM('optimizer_index_cost_adj' 10)
      ALL_ROWS
      OUTLINE_LEAF(@"SEL$2")
      OUTLINE_LEAF(@"SEL$3")
      OUTLINE_LEAF(@"SEL$1")
      NO_ACCESS(@"SEL$1" "C"@"SEL$1")
      NO_ACCESS(@"SEL$1" "W"@"SEL$1")
      LEADING(@"SEL$1" "C"@"SEL$1" "W"@"SEL$1")
      USE_HASH(@"SEL$1" "W"@"SEL$1")
      FULL(@"SEL$2" "X"@"SEL$2")
      INDEX_RS_ASC(@"SEL$3" "X"@"SEL$3" ("WORKER_COST_CENTRE_TBL"."COST_CENTRE"
              "WORKER_COST_CENTRE_TBL"."EFFECTIVE_DATE"))
      END_OUTLINE_DATA
Predicate Information (identified by operation id):
   2 - access("W"."WORKER_ID"="C"."WORKER_ID")
   4 - filter("X"."EXPIRATION_DATE">=TRUNC(SYSDATE@!))
   5 - access("X"."COST_CENTRE"='100033' AND "X"."EFFECTIVE_DATE"<=TRUNC(SYSDATE@!))
   6 - filter("PKG_TAW_SECURITY"."USER_WORKER_ACCESS"('CA17062','TIMEKEEPER',"W"."WORKER_ID",TRUN
              C(SYSDATE@!))=1)
Note
   - cardinality feedback used for this statement
62 rows selected.
This is the good one from development.
PLAN_TABLE_OUTPUT
SQL_ID  3zfrdhqpqk1mw, child number 0
select /*+ gather_plan_statistics */        w.worker_id, w.worker_name
from worker_v                   w,        worker_cost_centre_v       c
where w.worker_id = c.worker_id    and c.effective_date <=
trunc(sysdate)    and c.expiration_date >= trunc(sysdate)    and
c.cost_centre = '100033'    and pkg_taw_security.user_worker_access('CA1
7062',                                            'TIMEKEEPER',
                                   w.worker_id,
                   trunc(sysdate)) = 1  order by w.worker_name
Plan hash value: 3435904055
| Id  | Operation                      | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT               |                        |       |       |     5 (100)|          |
|   1 |  SORT ORDER BY                 |                        |    18 |   918 |     5  (20)| 00:00:01 |
|   2 |   NESTED LOOPS                 |                        |       |       |            |          |
|   3 |    NESTED LOOPS                |                        |    18 |   918 |     4   (0)| 00:00:01 |
|*  4 |     TABLE ACCESS BY INDEX ROWID| WORKER_COST_CENTRE_TBL |    18 |   522 |     2   (0)| 00:00:01 |
|*  5 |      INDEX RANGE SCAN          | WORKER_CC_CC_IDX       |    29 |       |     1   (0)| 00:00:01 |
|*  6 |     INDEX UNIQUE SCAN          | WORKER_PK              |     1 |       |     1   (0)| 00:00:01 |
|   7 |    TABLE ACCESS BY INDEX ROWID | WORKER_TBL             |     1 |    22 |     1   (0)| 00:00:01 |
Outline Data
  /*+
      BEGIN_OUTLINE_DATA
      IGNORE_OPTIM_EMBEDDED_HINTS
      OPTIMIZER_FEATURES_ENABLE('11.2.0.3')
      DB_VERSION('11.2.0.3')
      OPT_PARAM('optimizer_index_cost_adj' 10)
      ALL_ROWS
      OUTLINE_LEAF(@"SEL$5428C7F1")
      MERGE(@"SEL$2")
      MERGE(@"SEL$3")
      OUTLINE(@"SEL$1")
      OUTLINE(@"SEL$2")
      OUTLINE(@"SEL$3")
      INDEX_RS_ASC(@"SEL$5428C7F1" "X"@"SEL$3" ("WORKER_COST_CENTRE_TBL"."COST_CENTRE"
              "WORKER_COST_CENTRE_TBL"."EFFECTIVE_DATE"))
      INDEX(@"SEL$5428C7F1" "X"@"SEL$2" ("WORKER_TBL"."WORKER_ID"))
      LEADING(@"SEL$5428C7F1" "X"@"SEL$3" "X"@"SEL$2")
      USE_NL(@"SEL$5428C7F1" "X"@"SEL$2")
      NLJ_BATCHING(@"SEL$5428C7F1" "X"@"SEL$2")
      END_OUTLINE_DATA
Predicate Information (identified by operation id):
   4 - filter("X"."EXPIRATION_DATE">=TRUNC(SYSDATE@!))
   5 - access("X"."COST_CENTRE"='100033' AND "X"."EFFECTIVE_DATE"<=TRUNC(SYSDATE@!))
   6 - access("X"."WORKER_ID"="X"."WORKER_ID")
       filter("PKG_TAW_SECURITY"."USER_WORKER_ACCESS"('CA17062','TIMEKEEPER',"X"."WORKER_ID",TRUN
              C(SYSDATE@!))=1)
60 rows selected.
I'm not sure how to interpret what dbms_xplan is telling me above.  Any help would be greatly appreciated!!
Thanks,
Cory

Similar Messages

  • ADF BC: Choosing between two identical DB schemas on application startup

    Hi,
    We want to provide users with capability to choose between two identical db schema.
    Anu idea how to do this ?

    Cvele wrote:
    Thanks a lot ! My pleasure.
    One question: datasource name entered by the user (on the login form) is a JDBCDataSource property value for the Application module Configuration (which connect trough JDBC DataSource), correct ?Yes.
    If so, then, we still must define two different sets of App Module Configurations, one for each DB schema, correct ?No. I'm not suggesting that you implement your UI like the demo that I forwarded. It might not be appropriate for your user to type in the datasource name, but the same code would be required to make the datasource name change work. Rather than getting the datasource name from the HTTPRequest and setting on the session where the custom sesison cookie impl and env info provider access you, for your solution that datasource value might come from some other place that the end-user doesn't directly type in.
    Otherwise:
    1. we cannot have two different datasource names, correct ?The example I forwarded should allow you to enter different JNDI names, so those would be different datasources.
    2. in case of one Configuration – what is a way to define (at deployment time) username/password for each of those two schemas ? Is this correct ?The username/password information is encapsulated inside the Java EE container when you define the datasource. The application doesn't know that information and doesn't have to provide it when you are using a JDBC datasource by JNDI name.
    On the other hand, what confuses me, is a fact that you say:
    “You wouldn't use different configurations” And really, you example attached to me have just one App module Configuration (datasource name = jdbc/scottDS), which connect through dataSource.
    Wondering what a user can enter as datasource name, except jdbc/scottDS ?I forget whether in my example I configured another datasource, but the user could enter the name of any available JNDI name for the datasource on the Java EE container.
    Again, I don't suggest necessarily that you let the end-user type it in, that was just how I built the demo since I quickly evolved it from the other dynamic credentials demo that accepted the username and password from the end-user.

  • How to delete a path between two anchor points

    hi ,
    it's all in the title ,
    could you tell me  please how to delete a path between two anchor points without using the path eraser tool ?
    When I select these two anchor points and press delete everything is gone.
    ps : I want to keep the anchor points after the deletion
    Thank you

    Silkrooster wrote:
    With some experimentation, I did find that selecting the path can leave orphan points. So keep that in mind as it may be necessary to use Object>Path>Clean up...
    You will not get orphan points if you delete a segment that is not at the end of a path.  For segment that is at the end of a path, or is the entire path, select the end point/s and press delete. For the one segment that is entire path you can use the selection tool (black pointer) or hold Alt with the direct selection tool (white pointer) which is useful for objects in a group.

  • Shortest path between two arbitrary point in the network

    Hi All,
    In oracle NDM, it's possible to find shortest path between two nodes (e.g. using SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH), but I need to find shortest path between 2 points which are on the network edges. I suppose I should use (Interface SubPath) in network java apis. However I want to do it via PLSQL api. Should I code it myself or there exists a function?
    Any help is appreciated.
    Edited by: Fa on Dec 15, 2011 2:51 AM

    pritamg wrote:
    I have to build an application in which the user will draw the graph by creating nodes and edges.and then the start node will be marked.Then the shortest paths to other nodes will be displayed.Give me any possible clue how to start.I am in deep deep trouble.I have to use Dijkstra's Algorithm.
    please help some one...pleaseDo you know Dijkstra's Algorithm for shortest path? I believe that one was also called the traveling salesman problem. You can easily Google to find out what it is.
    Did you listen to your instructor when he/she did his/her lectures on recursion and halting contitions? If not, then please go talk to him/her and read your book, the forum is not a place to try to learn a basic concept that you should have paid attention in class for the first time.
    If you have code and you have specific questions post them and we will be glad to help, but we are not here to develop your homework solutions for you, no matter how that may affect your future.

  • Best approach to synchronize data between two oracle database remotely

    Hi All,
    We have requirement to synchronize data between custom application database and EBS database. Thw two database is on different location connected by 128 kbps connection.
    The synchronization will do the following task :
    - Download customer table from EBS (I have checked there are only 2000 rows of it)
    - Up load billing data to EBS auto invoice interface table
    The question is :
    What approach is the best way to do this synchronization task ? some that come into my mind :
    - create database link and run stored procedure to do the batch update ?
    - for Customer synchronization, is it a good idea to create Materialized view so that any update to EBS customer data will be updated, refreshed nightly
    - or is ther any better approach ?
    Thank you very much,
    xtanto
    Edited by: xtanto on Oct 18, 2008 3:30 PM

    Maybe try Streams?

  • Link two identical databases, same tables, same fields

    Post Author: CathyH
    CA Forum: Data Connectivity and SQL
    I have two Accpac databases (two different companies, one Canadian one US).  I have created the same report for both companies using their respective data tables and another where I have converted the US funds to Canadian. 
    I would now like to create one report that links the two companies. 
    I will be sorting on Customer.  Whenever a customer is set up in the US company a duplicate is set up in the Canadian company but Canadian customers are not duplicated in the US company (it's just something we have to do for billing purposes) so there will always be many more Canadian customers.
    I would like the report to add together any matching customers in the US and Canadian companies but also report the customers that are strictly Canadian.
    Can anyone help me?  Please!
    Cathy

    Post Author: synapsevampire
    CA Forum: Data Connectivity and SQL
    You might do this using advanced SQL on the database in a View or SP.
    Or another, somewhat fugly solution is to create a main report with the canadian database, group by the company, insert a subreport using the US database at the group level (header or footer), and link by the company.
    You can now respond to no rows in the subreport to indicate those that are not in the US database.
    Ain't purdy, but it'll work.
    -k

  • Problem with ORA-06502 when exp/imp between two identical versions

    Hi
    I have two identical systems, one system that I develop on and
    the test system. The two systems have the same version of the
    Portal. When I export and then import the application from the
    systems I get a error message on the test system.
    ORA-06502: PL/SQL: numeric or value error: character to number
    conversion error (WWV-11230)
    This error does not appear on the developing system.
    The application I have is a form on a table, and I have some
    buttons with PL/SQL handels on them. I tried to remove this code
    and export with no luck.
    Please help.
    The system:
    Windows NT
    Oracle Portal 3.0.8.9.8
    Thanks
    Jvrgen Swensen

    Could you pls confirm : Have you exported & Imported the shared
    components used by that form?
    If you are not too worried about the templates/fonts then try
    this:
    Click on "Edit" link against that form and click "OK".
    Thanx,
    Chetan.

  • Different full backup size of identical databases

    Hello,
    I am on Oracle 10GR2.
    I have 1 database instance with size approximately 50GB. Today I created second instance with RMAN duplication process from the first instance. So now I have two similar DB instances with same size 50GB.
    What is strange to me is size of FULL LEVEL0 backups of these databases.
    Backup size of original database has approximately 22 GB, backup size of second (duplicated) instance has 7GB.
    Can you explain me why? Or what should I do with original database to have same small backup size.
    Executed RMAN command for backup is: BACKUP INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG;
    Thank you

    select sum(bytes)/1024/1024/1024 GB from dba_segments;
    This select gives me 6,79 GB in both instances.
    I did not used UNTIL TIME for duplication.
    RMAN settings is same for both instances and I don't use any compression
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

  • Execution time of sql query differing a lot between two computer

    hi
    execution time of a query in my computer and more than 30 different computer is less than one second but on one of our
    customers' computers, execution time is more than ten minute. databases and data and queries are same. i re-install sql but problem remains. my sql is ms sql 2008 r2.
    any one has idea for this problem?

    Hi mahdi,
    Obviously, we can't get enough information to help you troubleshoot this issue. So, please elaborate your issue with more detail so that the community members can help you in more effecient manner.
    In addition, here is a good article regarding checklist for analyzing Slow-Running queries. Please see:
    http://technet.microsoft.com/en-us/library/ms177500(v=sql.105).aspx
    And SQL Server Profiler and Performance Monitor are good tools to troubleshoot performance issue, please see:
    Correlating SQL Server Profiler with Performance Monitor:
    https://www.simple-talk.com/sql/database-administration/correlating-sql-server-profiler-with-performance-monitor/
    Regards,
    Elvis Long
    TechNet Community Support

  • MacBook Pro: Swapping Hard Drives Between Two Identical Macs?

    I have two Macbook Pro notebooks. They are both the June 11th 2012 models both with cd/dvd drives. They both have Mavericks installed on both.
    I want to give my 15 inch to my son who has the 13 inch. They 13 will be mine and the 15 his.
    Can i just swap his 750HD from the 13 and put it into the 15? Can i also remove my 250 Samsung pro SSD from my 15 and put it in his 13?
    What are some ways i can go about this that are easy?
    Thanks in advance,
    PS: Like i said they both run mavericks and they are the same generation MBP from June 2012 release from Apple. Except one is a 2.5 i5 13 inch and the other is a 15 inch 2.3 Quad i7.
    We pretty much just want to trade laptops and swap the hard drives easy.
    Thanks again.

    nn007400,
    are each of your laptops associated with your respective Apple IDs? If so, then that might be a fly in the ointment when it comes to updating apps purchased through the Mac App Store, if the tie-in involves your MacBook Pros’ serial numbers as well as your Apple IDs. (I don’t know whether that’s the case or not.)
    The disks can certainly be exchanged physically between the two portables — you could try it for a while, and if you encounter a problem, you can exchange them back and consider alternative (but unfortunately less convenient) approaches.

  • Application to compare differences between two identical drives..

    Hi,
    I'm after an application that can be used to compare two separate drives (or better then that, specific folders on two separate drives), supposedly with the same files on each, and analyse the differences between the two (ie I want to make sure everything has copied from one to the other succesfully before deleting the original!)
    It's quite a large amount of data (500GB), and I don't need the software to actually do anything other than tell me the differences - nothing like copying the missing files is needed. I had to intentionally leave a few files behind as they were causing errors in the copying process.
    Any suggestions? Thanks!

    I am using the FormsTool V1.0 from the previously mentioned http://www.orcl-toolbox.com This is a great tool for doing diffs on Forms and Reports. It has saved me several times in the past. Never had the need for the replace functionality but I am sure it is just a matter of time.
    Also great for doing impact analysis when someone wants to change something and wants to know how many forms/reports are impacted.
    Well worth having a copy for the $200 cost. No I do not work for orcl-toolbox ;-)
    Bob.
    Message was edited by:
    Bob C

  • How to seperate the access for two identical databases from two application

    First I have to say I'm sorry... Oracle and the oracle architecture are totally new for me. However I hope to get some help with this.
    We have one Oracle 10g server and a database name A with table name X, Y and Z, for Application AA with access for property file AAA.
    The server capacity are almost not being used.
    Here are my thought, how can I add a database name B with table name X, Y and Z (yes same tables as in database A) data for application BB with access for property file BBB.
    how can I seperate the 2 property files (question: on a port number?), so in case there by a mistake should be switch around on 2 property files, it then is impossible to access the date from Application AA to date in database name B.
    Password on Database A (incl table) and Database B (incl table) are the same.
    Is there any solution to this?

    What I would like to do is make use of the resource on one machine.
    I have several similar applications, databases, tables and password where data should be totally separated from each other. however I would trying to prevent that there could be any data access from Application AA to Database B in case there should be a switch of property files
    I'm familiar with Sybase environment, however isn't there some thing fancy in oracle there can seperate to almost identical applications to access other databases

  • Finding Paths Between Two Nodes Using SQL Sorted by Cost

    Hi Gurus,
    I want to find all paths from source node to target node that shall be sorted by the cost. I don't know whether it could be achieved with SQL statement. How to start with this query? The script to create the underlying tables along with the data are given below:
    create table nodes ( nodeId int Primary Key, nodeName varchar(50));
    create table paths ( pathId int Primary Key, fromNodeId int, toNodeId int, cost int );
    insert into nodes values (1,'ISL');
    insert into nodes values (2,'LHR');
    insert into nodes values (3,'HYD');
    insert into nodes values (4,'FSL');
    insert into nodes values (5,'MUL');
    insert into nodes values (6,'KHI');
    insert into nodes values (7,'QT');
    insert into paths values (1,1,3,20);
    insert into paths values (2,1,5,10);
    insert into paths values (3,1,7,80);
    insert into paths values (4,2,4,10);
    insert into paths values (5,3,4,40);
    insert into paths values (6,3,5,20);
    insert into paths values (7,3,6,10);
    insert into paths values (8,6,7,30);
    insert into paths values (9,6,5,30);
    insert into paths values (10,6,3,10);
    insert into paths values (11,7,2,20);
    insert into paths values (12,5,4,40);
    insert into paths values (13,5,7,40);
    Suppose the source = ISL and target = QT, their are various paths from ISL to QT:
    Ord# Relative Path Cost
    ==== ================================= =================
    1. ISL -> MUL -> QT 50
    2. ISL -> HYD -> KHI -> QT 60
    3. ISL -> QT 80
    4. ISL -> HYD -> MUL -> QT 80
    5. ISL -> HYD to KHI -> MUL -> QT 100
    This gives us all possible paths sorted by cost.
    Any hint or help will be highly appreciated.
    Thanks in advance and best regards
    Bilal
    Edited by: naive2Oracle on Feb 11, 2011 9:59 AM

    I like recursive with clause B-)
    col path for a30
    with nodes(nodeId,nodeName) as(
    select 1,'ISL' from dual union
    select 2,'LHR' from dual union
    select 3,'HYD' from dual union
    select 4,'FSL' from dual union
    select 5,'MUL' from dual union
    select 6,'KHI' from dual union
    select 7,'QT'  from dual),
    paths(fromNodeId,toNodeId,cost) as(
    select 1,3,20 from dual union
    select 1,5,10 from dual union
    select 1,7,80 from dual union
    select 2,4,10 from dual union
    select 3,4,40 from dual union
    select 3,5,20 from dual union
    select 3,6,10 from dual union
    select 6,7,30 from dual union
    select 6,5,30 from dual union
    select 6,3,10 from dual union
    select 7,2,20 from dual union
    select 5,4,40 from dual union
    select 5,7,40 from dual),
    tmp(nodeName,fromNodeId,toNodeId,cost) as(
    select a.nodeName,b.fromNodeId,b.toNodeId,b.cost
      from nodes a,paths b
    where a.nodeId=b.fromNodeId),
    rec(nodeName,path,fromNodeId,toNodeId,cost) as(
    select nodeName,cast(nodeName as varchar2(40)),
    fromNodeId,toNodeId,cost
      from tmp
    where nodeName = 'ISL'
    union all
    select b.nodeName,a.path || '->' || b.nodeName,
    b.fromNodeId,b.toNodeId,
    a.cost+decode(b.nodeName,'QT',0,b.cost)
      from rec a,tmp b
    where a.toNodeId = b.fromNodeId
       and a.nodeName !='QT')
    CYCLE fromNodeId SET IsLoop TO 'Y' DEFAULT 'N'
    select path,cost from rec
    where IsLoop ='N'
      and nodeName ='QT'
    order by cost;
    PATH                    COST
    ISL->MUL->QT              50
    ISL->HYD->KHI->QT         60
    ISL->HYD->MUL->QT         80
    ISL->QT                   80
    ISL->HYD->KHI->MUL->QT   100

  • Color variation between two identical illustrator documents???

    I am trying to copy an object from one Illustrator document into another Illustrator document but it keeps changing the color and adding a small stroke around the object.  I can seem to figure out why it would be doing this????  I have check the color modes on both and they are both in CMYK.
    Any thoughts???

    Have you measured the colour?
    Do you get different readings or is it just a a contrast thing? (The "stroke" might be just an anti-aliasing artifact.)
    Sometimes your eyes can fool you.
    In this example the little grey inside squares are exactly the same colour but your eyes tell you that the left hand one is blueish and the right hand one is yellowish.

  • User Profile number mismatch between two identical farms

    I've created a secondary High Availability farm with, I believe, all of the same User Profile settings as the primary farm.
    The primary shows:
    Number of User Profiles 3,428
    Secondary:
    Number of User Profiles 3,363
    Any recommendations on how to compare these results in a way that will establish why there is a discrepancy?
    Thanks,
    Scott

    How long has the primary farm been running? My first thought is you may have some orphaned (old) profiles from users who no longer have accounts and maybe haven't been completed cleaned up.
    Another thought: Are you syncing the same OUs in both farms?
    Do you have multiple authentication stores (Active Directory and a custom FBA provider for example)?
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

Maybe you are looking for