CBO refuses hint (sometimes)

Sometimes, the CBO does not take hints. Can anyone explain it?
SQL:
SELECT * FROM v_osi_child v1 WHERE mainuuid IN (SELECT uuid FROM ot_sys_index_org v2 WHERE mainuuid IN(:p1))v_osi_child is a view which union-alls about 50 tables. ot_sys_index_org is here only used for getting some mainuuids.
The statement itself is free of sense :)
Explain plan:
| Id  | Operation            | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT     |                         |     4 | 17252 |   402K  (1)| 01:20:31 |
|*  1 |  HASH JOIN           |                         |     4 | 17252 |   402K  (1)| 01:20:31 |
|*  2 |   INDEX RANGE SCAN   | PK_OTSYSINDEX           |     4 |   340 |     4   (0)| 00:00:01 |
|   3 |   VIEW               | V_OSI_CHILD             |    56M|   223G|   402K  (1)| 01:20:27 |
|   4 |    UNION-ALL         |                         |       |       |            |          |
|   5 |     TABLE ACCESS FULL| FL_ALLG_BENUTZERDATEN   | 16797 |  1295K|   105   (0)| 00:00:02 |
|   6 |     TABLE ACCESS FULL| FL_BERATUNG             |    17 |  1343 |     3   (0)| 00:00:01 |
|   7 |     TABLE ACCESS FULL| PA_KBIVBI               | 16797 |  1295K|   105   (0)| 00:00:02 |
...This statement needs more than 10 minutes.
Inserting a hint:
SELECT /*+ push_pred(v1) */ * FROM v_osi_child v1 WHERE mainuuid IN (SELECT uuid FROM ot_sys_index_org v2 WHERE mainuuid IN(:p1));Explain plan:
| Id  | Operation                      | Name                       | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT               |                            |     4 | 17852 | 12747   (1)| 00:02:33 |
|   1 |  NESTED LOOPS                  |                            |     4 | 17852 | 12747   (1)| 00:02:33 |
|*  2 |   INDEX RANGE SCAN             | PK_OTSYSINDEX              |     4 |   532 |     4   (0)| 00:00:01 |
|   3 |   VIEW                         | V_OSI_CHILD                |     1 |  4330 |  3186   (1)| 00:00:39 |
|   4 |    UNION ALL PUSHED PREDICATE  |                            |       |       |            |          |
|   5 |     TABLE ACCESS BY INDEX ROWID| FL_ALLG_BENUTZERDATEN      |     1 |    79 |     2   (0)| 00:00:01 |
|*  6 |      INDEX RANGE SCAN          | OSI_FLALLGBENUTZE_MAINUUID |     1 |       |     1   (0)| 00:00:01 |
|   7 |     TABLE ACCESS BY INDEX ROWID| FL_BERATUNG                |     1 |    79 |     2   (0)| 00:00:01 |
|*  8 |      INDEX RANGE SCAN          | OSI_FLBERATUNG_MAINUUID    |     1 |       |     1   (0)| 00:00:01 |
|   9 |     TABLE ACCESS BY INDEX ROWID| PA_KBIVBI                  |     1 |    79 |     2   (0)| 00:00:01 |
|* 10 |      INDEX RANGE SCAN          | OSI_PAKBIVBI_MAINUUID      |     1 |       |     1   (0)| 00:00:01 |
|  11 |     TABLE ACCESS BY INDEX ROWID| FL_K_AKTIVITAET            |     1 |   100 |     2   (0)| 00:00:01 |
|* 12 |      INDEX RANGE SCAN          | OSI_FLKAKTIVITAET_MAINUUID |     1 |       |     1   (0)| 00:00:01 |
...Well, using the index on mainuuids is realy a good idea, if the estimated resultset of the subquery are about 4 rows.
Costs are decreased from 402k to 12747.
Query runs in a second.
Now, lets modify the subquery a little bit. Again, the estimated result of the subquery are 4 rows:
SELECT * FROM v_osi_child v1 WHERE mainuuid IN (SELECT mainuuid FROM ot_sys_index_org v2 WHERE value IN(:p1));Explain plan:
| Id  | Operation            | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT     |                         |     4 | 17104 |   402K  (1)| 01:20:31 |
|*  1 |  HASH JOIN RIGHT SEMI|                         |     4 | 17104 |   402K  (1)| 01:20:31 |
|*  2 |   INDEX RANGE SCAN   | IX_OT_SYS_INDEX01       |     4 |   192 |     5   (0)| 00:00:01 |
|   3 |   VIEW               | V_OSI_CHILD             |    56M|   223G|   402K  (1)| 01:20:27 |
|   4 |    UNION-ALL         |                         |       |       |            |          |
|   5 |     TABLE ACCESS FULL| FL_ALLG_BENUTZERDATEN   | 16797 |  1295K|   105   (0)| 00:00:02 |
|   6 |     TABLE ACCESS FULL| FL_BERATUNG             |    17 |  1343 |     3   (0)| 00:00:01 |
|   7 |     TABLE ACCESS FULL| PA_KBIVBI               | 16797 |  1295K|   105   (0)| 00:00:02 |
|   8 |     TABLE ACCESS FULL| FL_K_AKTIVITAET         |    26 |  2600 |     3   (0)| 00:00:01 |
...Well, almost the same values...
Now, use the same hint:
SELECT /*+ push_pred(v1) */ * FROM v_osi_child v1 WHERE mainuuid IN (SELECT mainuuid FROM ot_sys_index_org v2 WHERE value IN(:p1));Explain plan:
| Id  | Operation            | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT     |                         |     4 | 17104 |   402K  (1)| 01:20:31 |
|*  1 |  HASH JOIN RIGHT SEMI|                         |     4 | 17104 |   402K  (1)| 01:20:31 |
|*  2 |   INDEX RANGE SCAN   | IX_OT_SYS_INDEX01       |     4 |   192 |     5   (0)| 00:00:01 |
|   3 |   VIEW               | V_OSI_CHILD             |    56M|   223G|   402K  (1)| 01:20:27 |
|   4 |    UNION-ALL         |                         |       |       |            |          |
|   5 |     TABLE ACCESS FULL| FL_ALLG_BENUTZERDATEN   | 16797 |  1295K|   105   (0)| 00:00:02 |
|   6 |     TABLE ACCESS FULL| FL_BERATUNG             |    17 |  1343 |     3   (0)| 00:00:01 |
|   7 |     TABLE ACCESS FULL| PA_KBIVBI               | 16797 |  1295K|   105   (0)| 00:00:02 |
...Nothing has changed.
I can't explain it. It seems to be an oracle-bug...
Release: 11.1.0.7.0 - 64bit Production
OS: RHEL 5.3

Ulrich Weiss wrote:
All this is readable from the explain plans.I don't know the reason behind this behaviour and I don't have a 11g version to test on, but I found similar observations on a 10g database. A small yet complete reproducible test case always helps. Here is mine:
SQL> select * from v$version ;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE     10.2.0.4.0     Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> drop view v_t ;
View dropped.
SQL> drop table t1 purge ;
Table dropped.
SQL> drop table t purge ;
Table dropped.
SQL> create table t nologging as select * from all_objects ;
Table created.
SQL> create table t1 nologging as select * from t where rownum <= 1000 ;
Table created.
SQL> create or replace view v_t as
  2  select * from t where object_type = 'PACKAGE'
  3  union all
  4  select * from t where object_type = 'PACKAGE BODY' ;
View created.
SQL> explain plan for select * from v_t where object_id in (select object_id from t1 where owner = '
  2  SYS') ;
Explained.
SQL> exec dbms_stats.gather_table_stats(user, 'T') ;
PL/SQL procedure successfully completed.
SQL> exec dbms_stats.gather_table_stats(user, 'T1') ;
PL/SQL procedure successfully completed.
SQL> explain plan for select * from v_t where object_id in (select object_id from t1 where owner = 'SYS') ;
Explained.
SQL> select * from table(dbms_xplan.display) ;
PLAN_TABLE_OUTPUT
Plan hash value: 443534535
| Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT     |      |     2 |   274 |   333   (2)| 00:00:04 |
|*  1 |  HASH JOIN RIGHT SEMI|      |     2 |   274 |   333   (2)| 00:00:04 |
|*  2 |   TABLE ACCESS FULL  | T1   |   893 |  8037 |     5   (0)| 00:00:01 |
|   3 |   VIEW               | V_T  |  2055 |   256K|   327   (2)| 00:00:04 |
|   4 |    UNION-ALL         |      |       |       |            |          |
|*  5 |     TABLE ACCESS FULL| T    |  1067 |    97K|   164   (2)| 00:00:02 |
|*  6 |     TABLE ACCESS FULL| T    |   988 | 92872 |   164   (2)| 00:00:02 |
Predicate Information (identified by operation id):
   1 - access("OBJECT_ID"="OBJECT_ID")
   2 - filter("OWNER"='SYS')
   5 - filter("OBJECT_TYPE"='PACKAGE')
   6 - filter("OBJECT_TYPE"='PACKAGE BODY')
21 rows selected.
SQL> explain plan for select /*+ push_pred(v_t) */ * from v_t where object_id in (select object_id from t1 where owner = 'SYS') ;
Explained.
SQL> select * from table(dbms_xplan.display) ;
PLAN_TABLE_OUTPUT
Plan hash value: 443534535
| Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT     |      |     2 |   274 |   333   (2)| 00:00:04 |
|*  1 |  HASH JOIN RIGHT SEMI|      |     2 |   274 |   333   (2)| 00:00:04 |
|*  2 |   TABLE ACCESS FULL  | T1   |   893 |  8037 |     5   (0)| 00:00:01 |
|   3 |   VIEW               | V_T  |  2055 |   256K|   327   (2)| 00:00:04 |
|   4 |    UNION-ALL         |      |       |       |            |          |
|*  5 |     TABLE ACCESS FULL| T    |  1067 |    97K|   164   (2)| 00:00:02 |
|*  6 |     TABLE ACCESS FULL| T    |   988 | 92872 |   164   (2)| 00:00:02 |
Predicate Information (identified by operation id):
   1 - access("OBJECT_ID"="OBJECT_ID")
   2 - filter("OWNER"='SYS')
   5 - filter("OBJECT_TYPE"='PACKAGE')
   6 - filter("OBJECT_TYPE"='PACKAGE BODY')
21 rows selected.
SQL> explain plan for select v_t.* from v_t, t1 where v_t.object_id = t1.object_id and t1.owner = 'SYS' ;
Explained.
SQL> select * from table(dbms_xplan.display) ;
PLAN_TABLE_OUTPUT
Plan hash value: 2725479221
| Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT     |      |  1834 |   245K|   333   (2)| 00:00:04 |
|*  1 |  HASH JOIN           |      |  1834 |   245K|   333   (2)| 00:00:04 |
|*  2 |   TABLE ACCESS FULL  | T1   |   893 |  8037 |     5   (0)| 00:00:01 |
|   3 |   VIEW               | V_T  |  2055 |   256K|   327   (2)| 00:00:04 |
|   4 |    UNION-ALL         |      |       |       |            |          |
|*  5 |     TABLE ACCESS FULL| T    |  1067 |    97K|   164   (2)| 00:00:02 |
|*  6 |     TABLE ACCESS FULL| T    |   988 | 92872 |   164   (2)| 00:00:02 |
Predicate Information (identified by operation id):
   1 - access("V_T"."OBJECT_ID"="T1"."OBJECT_ID")
   2 - filter("T1"."OWNER"='SYS')
   5 - filter("OBJECT_TYPE"='PACKAGE')
   6 - filter("OBJECT_TYPE"='PACKAGE BODY')
21 rows selected.
SQL> explain plan for select /*+ push_pred(v_t) */ v_t.* from v_t, t1 where v_t.object_id = t1.object_id and t1.owner = 'SYS' ;
Explained.
SQL> select * from table(dbms_xplan.display) ;
PLAN_TABLE_OUTPUT
Plan hash value: 3926093524
| Id  | Operation                     | Name | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT              |      |  1834 |   263K|   292K  (2)| 00:58:28 |
|   1 |  NESTED LOOPS                 |      |  1834 |   263K|   292K  (2)| 00:58:28 |
|*  2 |   TABLE ACCESS FULL           | T1   |   893 | 11609 |     5   (0)| 00:00:01 |
|   3 |   VIEW                        | V_T  |     1 |   134 |   327   (2)| 00:00:04 |
|   4 |    UNION ALL PUSHED PREDICATE |      |       |       |            |          |
|*  5 |     TABLE ACCESS FULL         | T    |     1 |    94 |   164   (2)| 00:00:02 |
|*  6 |     TABLE ACCESS FULL         | T    |     1 |    94 |   164   (2)| 00:00:02 |
Predicate Information (identified by operation id):
   2 - filter("T1"."OWNER"='SYS')
   5 - filter("OBJECT_ID"="T1"."OBJECT_ID" AND "OBJECT_TYPE"='PACKAGE')
   6 - filter("OBJECT_ID"="T1"."OBJECT_ID" AND "OBJECT_TYPE"='PACKAGE BODY')
20 rows selected.As you can see, the PUSH_PRED hint is ignored when I use the IN clause with subquery.
I believe this is same as what you are experiencing. However, when I change the sql to use
a JOIN (instead of subquery), the hint is not ignored.
p.s. I hope my JOIN query is semantically equivalent to IN..SUBQUERY.

Similar Messages

  • Quick question on how CBO determines hows to access table partitions

    Hey all,
    I have a large table that is range partitioned on a "code" within the table (about 23 unique values). I'm able to query it very quickly and easily when I specify the code in a query... ie:
    select *
    from large_table
    where code = 'X'
    However, I am looking to calculate the code based on a reference table that I have. I can easily re-create the performance drop doing:
    select *
    from large_table
    where code = (Select 'X' from dual)
    When running the 2nd SQL, my query takes a very long time. I think I understand why (CBO can't "guess" the results of the subquery) and I understand that the easiest to fix this would be to just run the subquery first and pass its results to a second query.
    My question is if anyone knows of a way to provide the CBO a hint or any other trick that would allow Oracle to scan a single partition instead of the whole table using a method like this?

    Thanks Tubby, that link at least helps confirm my original reasoning for the degraded performance and appears to be for similar reasons
    As for the explain plans, here they are:
    (Slow Query -- Object names have been changed)
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 413 | 219K| | 18794 (1)| 00:03:46 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10013 | 413 | 219K| | 18794 (1)| 00:03:46 | | | Q1,13 | P->S | QC (RAND) |
    |* 3 | HASH JOIN RIGHT SEMI BUFFERED | | 413 | 219K| | 18794 (1)| 00:03:46 | | | Q1,13 | PCWP | |
    | 4 | BUFFER SORT | | | | | | | | | Q1,13 | PCWC | |
    | 5 | PX RECEIVE | | 2 | 8 | | 15 (7)| 00:00:01 | | | Q1,13 | PCWP | |
    | 6 | PX SEND HASH | :TQ10003 | 2 | 8 | | 15 (7)| 00:00:01 | | | | S->P | HASH |
    | 7 | VIEW | VW_NSO_1 | 2 | 8 | | 15 (7)| 00:00:01 | | | | | |
    | 8 | VIEW | view_ref_table | 2 | 26 | | 15 (7)| 00:00:01 | | | | | |
    |* 9 | TABLE ACCESS FULL | ref_table | 2 | 22 | | 15 (7)| 00:00:01 | | | | | |
    | 10 | PX RECEIVE | | 4543 | 2391K| | 18779 (1)| 00:03:46 | | | Q1,13 | PCWP | |
    | 11 | PX SEND HASH | :TQ10012 | 4543 | 2391K| | 18779 (1)| 00:03:46 | | | Q1,12 | P->P | HASH |
    |* 12 | HASH JOIN | | 4543 | 2391K| | 18779 (1)| 00:03:46 | | | Q1,12 | PCWP | |
    | 13 | BUFFER SORT | | | | | | | | | Q1,12 | PCWC | |
    | 14 | PX RECEIVE | | 11 | 187 | | 5 (0)| 00:00:01 | | | Q1,12 | PCWP | |
    | 15 | PX SEND BROADCAST | :TQ10002 | 11 | 187 | | 5 (0)| 00:00:01 | | | | S->P | BROADCAST |
    |* 16 | TABLE ACCESS FULL | threshold_table | 11 | 187 | | 5 (0)| 00:00:01 | | | | | |
    |* 17 | VIEW | | 430K| 214M| | 18774 (1)| 00:03:46 | | | Q1,12 | PCWP | |
    | 18 | WINDOW SORT | | 430K| 130M| 280M| 18774 (1)| 00:03:46 | | | Q1,12 | PCWP | |
    | 19 | PX RECEIVE | | 430K| 130M| | 18772 (1)| 00:03:46 | | | Q1,12 | PCWP | |
    | 20 | PX SEND HASH | :TQ10011 | 430K| 130M| | 18772 (1)| 00:03:46 | | | Q1,11 | P->P | HASH |
    |* 21 | HASH JOIN BUFFERED | | 430K| 130M| | 18772 (1)| 00:03:46 | | | Q1,11 | PCWP | |
    | 22 | BUFFER SORT | | | | | | | | | Q1,11 | PCWC | |
    | 23 | PX RECEIVE | | 7332 | 157K| | 16 (13)| 00:00:01 | | | Q1,11 | PCWP | |
    | 24 | PX SEND HASH | :TQ10001 | 7332 | 157K| | 16 (13)| 00:00:01 | | | | S->P | HASH |
    | 25 | VIEW | view_ref_table | 7332 | 157K| | 16 (13)| 00:00:01 | | | | | |
    | 26 | WINDOW SORT | | 7332 | 80652 | | 16 (13)| 00:00:01 | | | | | |
    | 27 | TABLE ACCESS FULL | ref_table | 7332 | 80652 | | 14 (0)| 00:00:01 | | | | | |
    | 28 | PX RECEIVE | | 129K| 36M| | 18756 (1)| 00:03:46 | | | Q1,11 | PCWP | |
    | 29 | PX SEND HASH | :TQ10010 | 129K| 36M| | 18756 (1)| 00:03:46 | | | Q1,10 | P->P | HASH |
    | 30 | BUFFER SORT | | 413 | 219K| | | | | | Q1,10 | PCWP | |
    | 31 | NESTED LOOPS | | 129K| 36M| | 18756 (1)| 00:03:46 | | | Q1,10 | PCWP | |
    | 32 | NESTED LOOPS | | 124K| 30M| | 14444 (1)| 00:02:54 | | | Q1,10 | PCWP | |
    | 33 | NESTED LOOPS | | 122K| 25M| | 10173 (1)| 00:02:03 | | | Q1,10 | PCWP | |
    |* 34 | HASH JOIN | | 123K| 23M| | 5893 (1)| 00:01:11 | | | Q1,10 | PCWP | |
    | 35 | PX RECEIVE | | 124K| 22M| | 5629 (1)| 00:01:08 | | | Q1,10 | PCWP | |
    | 36 | PX SEND HASH | :TQ10008 | 124K| 22M| | 5629 (1)| 00:01:08 | | | Q1,08 | P->P | HASH |
    | 37 | BUFFER SORT | | 413 | 219K| | | | | | Q1,08 | PCWP | |
    | 38 | NESTED LOOPS | | 124K| 22M| | 5629 (1)| 00:01:08 | | | Q1,08 | PCWP | |
    |* 39 | HASH JOIN | | 122K| 20M| | 1797 (2)| 00:00:22 | | | Q1,08 | PCWP | |
    | 40 | PX RECEIVE | | 119K| 17M| | 1101 (3)| 00:00:14 | | | Q1,08 | PCWP | |
    | 41 | PX SEND HASH | :TQ10006 | 119K| 17M| | 1101 (3)| 00:00:14 | | | Q1,06 | P->P | HASH |
    |* 42 | HASH JOIN | | 119K| 17M| | 1101 (3)| 00:00:14 | | | Q1,06 | PCWP | |
    | 43 | BUFFER SORT | | | | | | | | | Q1,06 | PCWC | |
    | 44 | PX RECEIVE | | 86 | 602 | | 3 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 45 | PX SEND BROADCAST | :TQ10000 | 86 | 602 | | 3 (0)| 00:00:01 | | | | S->P | BROADCAST |
    | 46 | TABLE ACCESS FULL | OFFICE | 86 | 602 | | 3 (0)| 00:00:01 | | | | | |
    |* 47 | HASH JOIN | | 119K| 16M| | 1098 (3)| 00:00:14 | | | Q1,06 | PCWP | |
    | 48 | PX RECEIVE | | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 49 | PX SEND BROADCAST | :TQ10004 | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,04 | P->P | BROADCAST |
    | 50 | PX BLOCK ITERATOR | | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,04 | PCWC | |
    |* 51 | TABLE ACCESS FULL | REF | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,04 | PCWP | |
    |* 52 | HASH JOIN | | 701K| 84M| | 1095 (3)| 00:00:14 | | | Q1,06 | PCWP | |
    | 53 | PX RECEIVE | | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 54 | PX SEND BROADCAST | :TQ10005 | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,05 | P->P | BROADCAST |
    | 55 | PX BLOCK ITERATOR | | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,05 | PCWC | |
    |* 56 | TABLE ACCESS FULL | REF | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 57 | PX BLOCK ITERATOR | | 16M| 1617M| | 1090 (2)| 00:00:14 | 1 | 24 | Q1,06 | PCWC | |
    | 58 | TABLE ACCESS FULL | Fact_Table | 16M| 1617M| | 1090 (2)| 00:00:14 | 1 | 24 | Q1,06 | PCWP | |
    | 59 | PX RECEIVE | | 13M| 323M| | 693 (1)| 00:00:09 | | | Q1,08 | PCWP | |
    | 60 | PX SEND HASH | :TQ10007 | 13M| 323M| | 693 (1)| 00:00:09 | | | Q1,07 | P->P | HASH |
    | 61 | PX BLOCK ITERATOR | | 13M| 323M| | 693 (1)| 00:00:09 | | | Q1,07 | PCWC | |
    | 62 | TABLE ACCESS FULL | Dimension 1 | 13M| 323M| | 693 (1)| 00:00:09 | | | Q1,07 | PCWP | |
    | 63 | TABLE ACCESS BY INDEX ROWID | Dimesnion 2 | 1 | 12 | | 0 (0)| 00:00:01 | | | Q1,08 | PCWP | |
    |* 64 | INDEX UNIQUE SCAN | Dimension 2 Index | 1 | | | 0 (0)| 00:00:01 | | | Q1,08 | PCWP | |
    | 65 | PX RECEIVE | | 15M| 151M| | 261 (2)| 00:00:04 | | | Q1,10 | PCWP | |
    | 66 | PX SEND HASH | :TQ10009 | 15M| 151M| | 261 (2)| 00:00:04 | | | Q1,09 | P->P | HASH |
    | 67 | PX BLOCK ITERATOR | | 15M| 151M| | 261 (2)| 00:00:04 | | | Q1,09 | PCWC | |
    | 68 | INDEX FAST FULL SCAN | Dimension 1 Index | 15M| 151M| | 261 (2)| 00:00:04 | | | Q1,09 | PCWP | |
    | 69 | TABLE ACCESS BY INDEX ROWID | Dimension 3 | 1 | 18 | | 0 (0)| 00:00:01 | | | Q1,10 | PCWP | |
    |* 70 | INDEX UNIQUE SCAN | Dimension 3 Index | 1 | | | 0 (0)| 00:00:01 | | | Q1,10 | PCWP | |
    | 71 | PARTITION HASH ITERATOR | | 1 | 39 | | 0 (0)| 00:00:01 | KEY | KEY | Q1,10 | PCWP | |
    | 72 | TABLE ACCESS BY LOCAL INDEX ROWID| Dimension 4 | 1 | 39 | | 0 (0)| 00:00:01 | KEY | KEY | Q1,10 | PCWP | |
    |* 73 | INDEX UNIQUE SCAN | dimension 6 Index | 1 | | | 0 (0)| 00:00:01 | KEY | KEY | Q1,10 | PCWP | |
    | 74 | TABLE ACCESS BY INDEX ROWID | Dimension 5 | 1 | 38 | | 0 (0)| 00:00:01 | | | Q1,10 | PCWP | |
    |* 75 | INDEX UNIQUE SCAN | Dimension 5 index | 1 | | | 0 (0)| 00:00:01 | | | Q1,10 | PCWP | |
    (Fast Query -- Object Names Changed)
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 107 | 57673 | | 1302 (1)| 00:00:16 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10009 | 107 | 57673 | | 1302 (1)| 00:00:16 | | | Q1,09 | P->S | QC (RAND) |
    |* 3 | HASH JOIN BUFFERED | | 107 | 57673 | | 1302 (1)| 00:00:16 | | | Q1,09 | PCWP | |
    | 4 | BUFFER SORT | | | | | | | | | Q1,09 | PCWC | |
    | 5 | PX RECEIVE | | 11 | 187 | | 5 (0)| 00:00:01 | | | Q1,09 | PCWP | |
    | 6 | PX SEND HASH | :TQ10002 | 11 | 187 | | 5 (0)| 00:00:01 | | | | S->P | HASH |
    |* 7 | TABLE ACCESS FULL | Threshold Table | 11 | 187 | | 5 (0)| 00:00:01 | | | | | |
    | 8 | PX RECEIVE | | 10163 | 5180K| | 1296 (1)| 00:00:16 | | | Q1,09 | PCWP | |
    | 9 | PX SEND HASH | :TQ10008 | 10163 | 5180K| | 1296 (1)| 00:00:16 | | | Q1,08 | P->P | HASH |
    |* 10 | VIEW | | 10163 | 5180K| | 1296 (1)| 00:00:16 | | | Q1,08 | PCWP | |
    | 11 | WINDOW SORT | | 10163 | 3185K| 6792K| 1296 (1)| 00:00:16 | | | Q1,08 | PCWP | |
    | 12 | PX RECEIVE | | 10163 | 3185K| | 1295 (1)| 00:00:16 | | | Q1,08 | PCWP | |
    | 13 | PX SEND HASH | :TQ10007 | 10163 | 3185K| | 1295 (1)| 00:00:16 | | | Q1,07 | P->P | HASH |
    |* 14 | HASH JOIN BUFFERED | | 10163 | 3185K| | 1295 (1)| 00:00:16 | | | Q1,07 | PCWP | |
    | 15 | BUFFER SORT | | | | | | | | | Q1,07 | PCWC | |
    | 16 | PX RECEIVE | | 148 | 3256 | | 15 (7)| 00:00:01 | | | Q1,07 | PCWP | |
    | 17 | PX SEND HASH | :TQ10001 | 148 | 3256 | | 15 (7)| 00:00:01 | | | | S->P | HASH |
    | 18 | VIEW | view_ref table | 148 | 3256 | | 15 (7)| 00:00:01 | | | | | |
    | 19 | WINDOW SORT | | 148 | 2072 | | 15 (7)| 00:00:01 | | | | | |
    |* 20 | TABLE ACCESS FULL | ref table | 148 | 2072 | | 14 (0)| 00:00:01 | | | | | |
    | 21 | PX RECEIVE | | 6867 | 2005K| | 1279 (1)| 00:00:16 | | | Q1,07 | PCWP | |
    | 22 | PX SEND HASH | :TQ10006 | 6867 | 2005K| | 1279 (1)| 00:00:16 | | | Q1,06 | P->P | HASH |
    | 23 | BUFFER SORT | | 107 | 57673 | | | | | | Q1,06 | PCWP | |
    | 24 | NESTED LOOPS | | 6867 | 2005K| | 1279 (1)| 00:00:16 | | | Q1,06 | PCWP | |
    | 25 | NESTED LOOPS | | 6591 | 1679K| | 1050 (1)| 00:00:13 | | | Q1,06 | PCWP | |
    |* 26 | HASH JOIN | | 6604 | 1567K| | 821 (1)| 00:00:10 | | | Q1,06 | PCWP | |
    | 27 | BUFFER SORT | | | | | | | | | Q1,06 | PCWC | |
    | 28 | PX RECEIVE | | 86 | 602 | | 3 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 29 | PX SEND HASH | :TQ10000 | 86 | 602 | | 3 (0)| 00:00:01 | | | | S->P | HASH |
    | 30 | TABLE ACCESS FULL | OFFICE | 86 | 602 | | 3 (0)| 00:00:01 | | | | | |
    | 31 | PX RECEIVE | | 6604 | 1522K| | 817 (1)| 00:00:10 | | | Q1,06 | PCWP | |
    | 32 | PX SEND HASH | :TQ10005 | 6604 | 1522K| | 817 (1)| 00:00:10 | | | Q1,05 | P->P | HASH |
    | 33 | NESTED LOOPS | | 6604 | 1522K| | 817 (1)| 00:00:10 | | | Q1,05 | PCWP | |
    | 34 | NESTED LOOPS | | 6541 | 1258K| | 590 (1)| 00:00:08 | | | Q1,05 | PCWP | |
    | 35 | NESTED LOOPS | | 6612 | 1207K| | 475 (1)| 00:00:06 | | | Q1,05 | PCWP | |
    | 36 | NESTED LOOPS | | 6507 | 1112K| | 272 (2)| 00:00:04 | | | Q1,05 | PCWP | |
    |* 37 | HASH JOIN | | 6352 | 924K| | 51 (4)| 00:00:01 | | | Q1,05 | PCWP | |
    | 38 | PX RECEIVE | | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 39 | PX SEND BROADCAST | :TQ10003 | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,03 | P->P | BROADCAST |
    | 40 | PX BLOCK ITERATOR | | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,03 | PCWC | |
    |* 41 | TABLE ACCESS FULL | REF | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,03 | PCWP | |
    |* 42 | HASH JOIN | | 37236 | 4690K| | 48 (3)| 00:00:01 | | | Q1,05 | PCWP | |
    | 43 | PX RECEIVE | | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 44 | PX SEND BROADCAST | :TQ10004 | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,04 | P->P | BROADCAST |
    | 45 | PX BLOCK ITERATOR | | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,04 | PCWC | |
    |* 46 | TABLE ACCESS FULL | REF | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,04 | PCWP | |
    | 47 | PX BLOCK ITERATOR | | 849K| 88M| | 46 (3)| 00:00:01 | KEY | KEY | Q1,05 | PCWC | |
    | 48 | TABLE ACCESS FULL | Fact Table | 849K| 88M| | 46 (3)| 00:00:01 | 5 | 5 | Q1,05 | PCWP | |
    | 49 | TABLE ACCESS BY INDEX ROWID | Dim 1     | 1 | 26 | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    |* 50 | INDEX UNIQUE SCAN | Dim 1 index | 1 | | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 51 | TABLE ACCESS BY INDEX ROWID | Dim 2 | 1 | 12 | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    |* 52 | INDEX UNIQUE SCAN | Dim 2 index | 1 | | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    |* 53 | INDEX UNIQUE SCAN | Dim 3 Index | 1 | 10 | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 54 | PARTITION HASH ITERATOR | | 1 | 39 | | 0 (0)| 00:00:01 | KEY | KEY | Q1,05 | PCWP | |
    | 55 | TABLE ACCESS BY LOCAL INDEX ROWID| Dim 4 | 1 | 39 | | 0 (0)| 00:00:01 | KEY | KEY | Q1,05 | PCWP | |
    |* 56 | INDEX UNIQUE SCAN | Dim 4 Index | 1 | | | 0 (0)| 00:00:01 | KEY | KEY | Q1,05 | PCWP | |
    | 57 | TABLE ACCESS BY INDEX ROWID | Dim 5 | 1 | 18 | | 0 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    |* 58 | INDEX UNIQUE SCAN | Dim 5 Index | 1 | | | 0 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 59 | TABLE ACCESS BY INDEX ROWID | Dim 6 | 1 | 38 | | 0 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    |* 60 | INDEX UNIQUE SCAN | Dim 6 Index | 1 | | | 0 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    DB Version is 10g R2:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
    NLSRTL Version 10.2.0.4.0 - Production

  • CTAS Hints

    Is there anything one should know when trying to insert HINTS into a CREATE TABLE ... AS SELECT ... (CTAS) command? Hints sometimes do not seem to work for CTAS. Among other things, I get the impression that FIRST_ROWS is treated as ALL_ROWS because the command does not transactionally introduce the first row to the database till the entire table is released.
    Where should hints be placed in a CTAS?
    If the command has subqueries where should their hints be placed, and is there a special syntax to reference nested query?
    How can I get V$SESSION_LONGOPS to show long-running CTAS commands?
    One big issue we are having that is generating all these queries is that sometimes, and for no apparent reason, the optimizer will execute a plan for a CTAS that loads a 100 million row table into memory for a MULTI-PASS HASH JOIN that changes the execution time from 15 minutes to 5 days. I noticed other are having this same problem. It seem the optimizer does not consider the cost of multiple passes when a hash join exceeds memory. Also, the NO_USE_HASH hint does not seem to work.
    I'd be happy to get suggestions on any of the above questions.

    Were you trying to illustrate use of the APPEND hint? I don't see anything about that in the plan listed ... It is the LOAD AS SELECT part. Compare the following plans and see the difference:
    SQL> explain plan for insert into emp select * from emp;
    Explained.
    SQL> select * from table(dbms_xplan.display());
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
    |   0 | INSERT STATEMENT     |             |    14 |   518 |     2 |
    |   1 |  TABLE ACCESS FULL   | EMP         |    14 |   518 |     2 |
    9 rows selected.
    SQL> explain plan for insert /*+ append */ into emp select * from emp;
    Explained.
    SQL> select * from table(dbms_xplan.display());
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
    |   0 | INSERT STATEMENT     |             |    14 |   518 |     2 |
    |   1 |  LOAD AS SELECT      |             |       |       |       |
    |   2 |   TABLE ACCESS FULL  | EMP         |    14 |   518 |     2 |
    10 rows selected.
    SQL> explain plan for create table emp_test as select * from emp;
    Explained.
    SQL> select * from table(dbms_xplan.display());
    PLAN_TABLE_OUTPUT
    | Id  | Operation              |  Name       | Rows  | Bytes | Cost  |
    |   0 | CREATE TABLE STATEMENT |             |    14 |   518 |     2 |
    |   1 |  LOAD AS SELECT        |             |       |       |       |
    |   2 |   TABLE ACCESS FULL    | EMP         |    14 |   518 |     2 |
    10 rows selected.

  • Howto use an existing record as template in a create new record form

    hi all,
    I have a table with configuration lines, Currently accessible via a report/form combination. This works fine to create, view & edit data.
    However users often need to create a new record which is 90% like an existing record.
    So what they want is to go to an existing record and use it as template for creating a new record (by clicking a button "create copy from"
    My solution attempt
    -when the button is pressed send users to the normal create form, and prefill some of the items with data from the "template record", after which everything is the same as creating a record from scratch
    What did I try
    - as above redirect user to the "create page" and sent the desired items values via URL Syntax. Failed since I have about 20 items and the button settings won't allow me to add more then 10 (besides it not a pretty sight)
    - Instead of sending via URL I've tried only sending the record id for the template and have a "before header process" load the item values in session state. Failed since the page items are all (load form source each time) since they are database columns
    Constraints for the solution
    - No, I can't go first inserting a copy of the record and then display it in edit mode since the remaining 10% of the record can not to be copied because of table constraints. They have serious constraints, which needs user input.
    - (and no I can't first insert dummy data, that's a poor man's solution)
    - I'd like to reuse the current create/edit form since it contains quite some business rules and constraints. So dubbing the page will put me up with a double load of maintenance in case of future changes in business rules
    I'd appreciate any good clues in solving this requirement
    best regards,
    Geert

    Hi Shunt,
    Not entirely what I wanted accomplished but it held the key.
    Removing the PK wouldn't trigger the DML to respond differently on it's own, since the DML decides the database action based on the request.
    I have the create/edit page working on with a "COPY" request
    This way I can call the page both from the report as the form page.
    When called with COPY request the page is loaded as normal edit except
    - I hide the delete and apply changes button
    - I show the create button
    When the create button is pressed a computation removes the PK
    Since the create button is pressed instead of apply_changes it will indeed perform an insert
    Thanx again for the hint
    Sometimes you need an new perspective
    Geert

  • How can I have my servlet accept 100 concurrent client requests?

              My servlet extends HttpServlet so it is multithreaded. Then I have written a java
              client which starts 100 concurrent threads that try to contact the servlet.
              There are always lots of threads which are refused by the Weblogic Server 6.0.
              They get a 'Connection refused' exception. Sometimes there are 50 refused connections,
              sometimes there are 0 refused connections (not very often), sometimes there are
              80 refused connections (usually).
              I have checked the 'Servlet' documentation and the 'J2EE Design Considerations
              for Weblogic Server' which recommends not to exceede the execute thread count
              number of 15. I have not changed that value, I do not even know if it still exists
              in Weblogic 6.0 as the document refers to the 5.0 version.
              Does anybody know how to solve this problem? How can I have the client requests
              waiting rather than being refused? Of course the main goal is to serve all the
              client requests, not to refuse.
              This is the code that the client thread uses to contact the servlet:
              URL url = new URL("http://localhost:7001/examplesWebApp/myServlet");
              URLConnection conn = url.openConnection();
              conn.setDoInput(true);
              conn.setDoOutput(true);
              DataOutputStream os = new DataOutputStream(conn.getOutputStream());
              os.writeBytes()
              os.writeBytes()
              Thanks for your time,
              David
              

              The key is
              KKEY_LOCALMACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters
              There you may need add a value "MaxUserPort" as REG_DWORD (5000 is default), also
              change "TcpTimedWaitDelay" to small number (30 is minimum). You may have trouble
              to find them. Just add them.
              You can also use Microsoft Web Application Stress Tool to test your Weblogic applications.
              As a free test tool, it is really powerful, although not so flexible.
              I guess you write your own test tool with java.net.URLConnection. I am not sure
              about the power of this class. In my case, I wrote my stress test tools with Java
              Socket. I can test application on Weblogic 6 with 1000 threads with my own tool
              and Microsoft tool, depending on memory and CPU of the machines I use. I run my
              tests on both Windows 2000 professional and Solaris.
              Check your CPU and memory usage with task manager.
              On the other hand, you should check log message on Weblogic 6. Try to turn on
              HTTP debug by add the following in your config.xml in tag <Server>.
              <ServerDebug DebugHttp="true" DebugURLResolution="true"
              JDBCConn="true" JDBCSQL="true" ListenThreadDebug="true" Name="myserver"/>
              "David Ruana" <[email protected]> wrote:
              >
              >Xiang, I really appreciate your help. I changed my Weblogic server configuration
              >from the console but I still experience the same problems.
              >
              >I start my 100 threads, and from about the 20th onward all them get the
              >'Connection
              >refused' exception in the URLConnection::getOutputStream() function,
              >always after
              >a successful URLConnection::openConnetion().
              >
              >My system is Windows 2000 Professional (Spanish version). I tried to
              >check the
              >open client socket descriptor limit but I was not able to find the TCPIP/MAXUSERPORT
              >in the registry. Do you know how is this entry called in Windows 2000?
              >
              >At this point I am not sure whether my problems are related to the Weblogic
              >server
              >or to the operative system. I will keep trying... I would appreciate
              >any other
              >suggestion.
              >
              >Thank you very much.
              >
              >
              >
              >"Xiang Rao" <[email protected]> wrote:
              >>
              >>It is better to use Weblogic 6 console to configure Weblogic server.
              >>In the console,
              >>there is tab Servers->myServer->Congiguration->Tuning, you can find
              >execute
              >>length
              >>and backlog.
              >>
              >>If you use Windows as test client, note Windows have a 5000 open client
              >>socket
              >>descriptors limit. You need change Windows Registry (TCPIP/MAXUSERPORT)
              >>to change
              >>this parameter.
              >>
              >>On the other hand, during test, you should monitor your test via Weblogic
              >>console
              >>(myServer->Monitoring->Performance), here you can see the change of
              >wait
              >>queue.
              >>If the queue keeps increaing, you are in trouble.
              >>
              >>Since you know how to use MBean, try to write customized (servlet, for
              >>example)
              >>to collect the following data: opened socket number, open socket number,
              >>opened
              >>session number and open session number. The two "open" numbers will
              >give
              >>you some
              >>clue. Also record your CPU and memory usage.
              >>
              >>BTW, what is the output you get from your test in terms of number of
              >>requests
              >>per second, response time and number of bytes downloaded/uplodaed per
              >>second?
              >>Are your test client and Weblogic running on the same machine?
              >>
              >>
              >>
              >>"David Ruana" <[email protected]> wrote:
              >>>
              >>>By the way, this is a piece of the config.xml file where you can see
              >>>my Server
              >>>configuration. It is the configuration which is installed in the examplesServer
              >>>in the free evaluation of Weblogic 6.0. I only modified the AcceptBacklog
              >>>value,
              >>>and added the ThreadPoolSize="15" line which was missing (I copied
              >from
              >>>the petstoreServer).
              >>>
              >>> <Server AcceptBacklog="1000" AdministrationPort="0" ClusterWeight="1"
              >>> ConsoleInputEnabled="false" DGCIdlePeriodsUntilTimeout="2"
              >>> DefaultProtocol="t3" DefaultSecureProtocol="t3s"
              >>> HttpdEnabled="true" JavaCompiler="C:\bea\jdk130/bin/javac"
              >>> ListenPort="7001" Name="examplesServer" NativeIOEnabled="true"
              >>>     ThreadPoolSize="15"
              >>> SocketReaderTimeoutMaxMillis="10"
              >>> TransactionLogFilePrefix="config/examples/logs/"
              >>> TunnelingClientPingSecs="45" TunnelingClientTimeoutSecs="40"
              >>>XMLRegistry="examplesXMLRegistry">
              >>> <ServerDebug Name="examplesServer"/>
              >>> <WebServer DefaultWebApp="DefaultWebApp_examplesServer"
              >>> LogFileName="./config/examples/logs/access.log"
              >>> LoggingEnabled="true" Name="examplesServer"/>
              >>> <Log FileName="./config/examples/logs/weblogic.log" Name="examplesServer"/>
              >>> <KernelDebug Name="examplesServer"/>
              >>> <SSL Enabled="true" ListenPort="7002" Name="examplesServer"
              >>> PeerValidationEnforced="0"
              >>> ServerCertificateChainFileName="./config/examples/ca.pem"
              >>> ServerCertificateFileName="./config/examples/democert.pem"
              >>> ServerKeyFileName="./config/examples/demokey.pem" TrustedCAFileName="./config/examples/ca.pem"/>
              >>> </Server>
              >>>
              >>>
              >>>
              >>>
              >>>
              >>>"Xiang Rao" <[email protected]> wrote:
              >>>>
              >>>>You only need to change Weblogic HTTP configuration. Give the server
              >>>>a big socket
              >>>>Backlog number. Since you test with 100 threads, you can think 1000
              >>>to
              >>>>5000, i.e.,
              >>>>1000 to 5000 requests will be in queue before got served. Aslo, you
              >>>might
              >>>>need
              >>>>to change your OS TCP/IP settings (both test clients and servers),
              >>such
              >>>>as maximum
              >>>>number of sockets and timeout value(so closed sockets will release
              >>socket
              >>>>descriptors
              >>>>immediately).
              >>>>
              >>>>On the other hand, the number of executive threads can be much larger
              >>>>than 15
              >>>>(50-200 is a normal number), depending on the features of your application.
              >>>>You
              >>>>can try your stress test tools to find a reasonable number by analyzing
              >>>>the relationships
              >>>>among (throughtput, response time, number of executive threads, etc).
              >>>>
              >>>>
              >>>>"David Ruana" <[email protected]> wrote:
              >>>>>
              >>>>>My servlet extends HttpServlet so it is multithreaded. Then I have
              >>>written
              >>>>>a java
              >>>>>client which starts 100 concurrent threads that try to contact the
              >>>servlet.
              >>>>>
              >>>>>There are always lots of threads which are refused by the Weblogic
              >>>Server
              >>>>>6.0.
              >>>>>They get a 'Connection refused' exception. Sometimes there are 50
              >>refused
              >>>>>connections,
              >>>>>sometimes there are 0 refused connections (not very often), sometimes
              >>>>>there are
              >>>>>80 refused connections (usually).
              >>>>>
              >>>>>I have checked the 'Servlet' documentation and the 'J2EE Design Considerations
              >>>>>for Weblogic Server' which recommends not to exceede the execute
              >thread
              >>>>>count
              >>>>>number of 15. I have not changed that value, I do not even know if
              >>>it
              >>>>>still exists
              >>>>>in Weblogic 6.0 as the document refers to the 5.0 version.
              >>>>>
              >>>>>Does anybody know how to solve this problem? How can I have the client
              >>>>>requests
              >>>>>waiting rather than being refused? Of course the main goal is to
              >serve
              >>>>>all the
              >>>>>client requests, not to refuse.
              >>>>>
              >>>>>This is the code that the client thread uses to contact the servlet:
              >>>>>
              >>>>>URL url = new URL("http://localhost:7001/examplesWebApp/myServlet");
              >>>>>URLConnection conn = url.openConnection();
              >>>>>conn.setDoInput(true);
              >>>>>conn.setDoOutput(true);
              >>>>>
              >>>>>DataOutputStream os = new DataOutputStream(conn.getOutputStream());
              >>>>>os.writeBytes()
              >>>>>os.writeBytes()
              >>>>>...
              >>>>>
              >>>>>Thanks for your time,
              >>>>>David
              >>>>>
              >>>>
              >>>
              >>
              >
              

  • Commented Code

    I have thousand of commented code in my procedure suppose I delete all commented code and remove all dbms_output statment will it Improve performance?
    Pls reply
    Umesh

    Not saying comments is a bad thing in itself. But comments in a SQL (depending on the Oracle version) can wind up in the Shared Pool. It is also can prevent a SQL from being sharable.
    This is what happens in 9i when you use comments in the SQL. It winds up in the Shared Pool:
    SQL> create or replace procedure fooProc is
    2 i integer;
    3 begin
    4 select
    5 /* this is comment line 1
    6 line2
    7 and yet another comment
    8 */
    9 count(*) into i
    10 from user_objects;
    11 end;
    12 /
    Procedure created.
    SQL> show errors
    No errors.
    SQL>
    SQL> exec fooProc
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select sql_text from v$sqlarea
    2 where sql_text like '%user_objects';
    SQL_TEXT
    SELECT /* this is comment line 1 line2 and yet another comment
    */ count(*) from user_objects
    SQL>
    The 10g parser is more clever than this and will strip out non CBO comment hints from the SQL (and remove whitespaces and formatting) in order to "clean" the SQL and making it more uniform and thus more likely sharable with the same SQL that has been formatted differently. Here's a 10g example:
    [pre]
    SQL> create or replace procedure fooProc is
    2 i integer;
    3 begin
    4 select
    5 /* this is comment line 1
    6 line2
    7 and yet another comment
    8 */
    9 count(*) into i
    10 from user_objects;
    11 end;
    12 /
    Procedure created.
    SQL> show errors
    No errors.
    SQL>
    SQL> exec fooProc
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select sql_text from v$sqlarea
    2 where sql_text like '%USER_OBJECTS';
    SQL_TEXT
    SELECT COUNT(*) FROM USER_OBJECTS
    SQL>
    Note - all uppercase and no comments.
    It was just simply good practice to rather comment before or after a SQL in the past. Not so much relevant anymore, but lots of people still are using 9i and should note this.

  • Cannot log in to Creative Cloud, this keeps happening!

    Hi, I spoke with a very friendly and helpful agent over chat a week ago, but now when I try to get back on to chat it says I am not eligible!! The same problem has happened again, and I would LOVE to talk to someone to work out why the screen looks like this and I cannot click anything that you can see on the log in screen. Last time on chat, he took remote control of my machine and sorted it, but now I am chasing time again and I really don't know what to do. Honestly, it seems very swish, but life was much easier with a CD to install.
    Please can someone get back to me?
    Thanks
    James

    Hello,
    in addition to GautamBahl's hint: sometimes the "opm.db file" is the culprit. In this case you should delete it. BUT as strange as it may seem I fear it's a challenge for Adobe's Creative Cloud Cleaner Tool.
    Sometimes - for whatever reasons - CC doesn't "want" to work. In this case you should CC completely delete and reinstall by help of Adobe Creative Cloud Cleaner Tool. (A try to uninstall by own resources is not enough!)
    I quote: ... helps resolve installation problems for Adobe Creative Cloud and Adobe Creative Suite (CS3-CS6) applications. The tool removes installation records for prerelease installations of Creative Cloud or Creative Suite applications. It does not affect existing installations of previous versions of Creative Cloud or Creative Suite applications.
    Please use: http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html and follow the prescribed sequence of operations
    If necessary and for further questions and if "open" please use chat, I had the best experiences.
    Hans-Günter

  • A SQL tuning issue-sql runs much slower in test than in production?

    Hi Buddies,
    I am working on a sql tuning issue. A sql runs much slower in test than in production.
    I compared the two explain plans in test and production
    seems in test, CBO refuses to use index SUBLEDGER_ENTRY_I2.
    we rebuile it and re-gether that index statistcs. run, still slow..
    I compared the init.ora parameters like hash_area_size, sort_area_size in test, they are same as production.
    I wonder if any expert friend can show some light.
    in production,
    SQL> set autotrace traceonly
    SQL> SELECT rpt_horizon_subledger_entry_vw.onst_offst_cd,
    2 rpt_horizon_subledger_entry_vw.bkng_prd,
    3 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
    4 rpt_horizon_subledger_entry_vw.jrnl_id,
    5 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
    6 rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
    7 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
    8 rpt_horizon_subledger_entry_vw.crprt_melob_cd AS corp_mlb_cd,
    rpt_horizon_subledger_entry_vw.onst_offst_cd, SUM (amt) AS amount
    9 10 FROM rpt_horizon_subledger_entry_vw
    11 WHERE rpt_horizon_subledger_entry_vw.bkng_prd = '092008'
    12 AND rpt_horizon_subledger_entry_vw.jrnl_id = 'RCS0002100'
    13 AND rpt_horizon_subledger_entry_vw.systm_afflt_cd = 'SAFF01'
    14 GROUP BY rpt_horizon_subledger_entry_vw.onst_offst_cd,
    15 rpt_horizon_subledger_entry_vw.bkng_prd,
    16 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
    17 rpt_horizon_subledger_entry_vw.jrnl_id,
    18 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
    19 rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
    20 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
    21 rpt_horizon_subledger_entry_vw.crprt_melob_cd,
    22 rpt_horizon_subledger_entry_vw.onst_offst_cd;
    491 rows selected.
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=130605 Card=218764 B
    ytes=16407300)
    1 0 SORT (GROUP BY) (Cost=130605 Card=218764 Bytes=16407300)
    2 1 VIEW OF 'RPT_HORIZON_SUBLEDGER_ENTRY_VW' (Cost=129217 Ca
    rd=218764 Bytes=16407300)
    3 2 SORT (UNIQUE) (Cost=129217 Card=218764 Bytes=35877296)
    4 3 UNION-ALL
    5 4 HASH JOIN (Cost=61901 Card=109382 Bytes=17719884)
    6 5 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_ACCNT'
    (Cost=2 Card=111 Bytes=3774)
    7 5 HASH JOIN (Cost=61897 Card=109382 Bytes=14000896
    8 7 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACC
    OUNT' (Cost=2 Card=57 Bytes=1881)
    9 7 HASH JOIN (Cost=61893 Card=109382 Bytes=103912
    90)
    10 9 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cost=
    34 Card=4282 Bytes=132742)
    11 9 HASH JOIN (Cost=61833 Card=109390 Bytes=7000
    960)
    12 11 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGE
    R_ENTRY' (Cost=42958 Card=82076 Bytes=3611344)
    13 12 INDEX (RANGE SCAN) OF 'SUBLEDGER_ENTRY_I
    2' (NON-UNIQUE) (Cost=1069 Card=328303)
    14 11 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_
    LINK' (Cost=14314 Card=9235474 Bytes=184709480)
    15 4 HASH JOIN (Cost=61907 Card=109382 Bytes=18157412)
    16 15 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_ACCNT'
    (Cost=2 Card=111 Bytes=3774)
    17 15 HASH JOIN (Cost=61903 Card=109382 Bytes=14438424
    18 17 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACC
    OUNT' (Cost=2 Card=57 Bytes=1881)
    19 17 HASH JOIN (Cost=61899 Card=109382 Bytes=108288
    18)
    20 19 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cost=
    34 Card=4282 Bytes=132742)
    21 19 HASH JOIN (Cost=61838 Card=109390 Bytes=7438
    520)
    22 21 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGE
    R_ENTRY' (Cost=42958 Card=82076 Bytes=3939648)
    23 22 INDEX (RANGE SCAN) OF 'SUBLEDGER_ENTRY_I
    2' (NON-UNIQUE) (Cost=1069 Card=328303)
    24 21 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_
    LINK' (Cost=14314 Card=9235474 Bytes=184709480)
    Statistics
    25 recursive calls
    18 db block gets
    343266 consistent gets
    370353 physical reads
    0 redo size
    15051 bytes sent via SQL*Net to client
    1007 bytes received via SQL*Net from client
    34 SQL*Net roundtrips to/from client
    1 sorts (memory)
    1 sorts (disk)
    491 rows processed
    in test
    SQL> set autotrace traceonly
    SQL> SELECT rpt_horizon_subledger_entry_vw.onst_offst_cd,
    2 rpt_horizon_subledger_entry_vw.bkng_prd,
    3 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
    4 rpt_horizon_subledger_entry_vw.jrnl_id,
    5 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
    rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
    6 7 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
    8 rpt_horizon_subledger_entry_vw.crprt_melob_cd AS corp_mlb_cd,
    9 rpt_horizon_subledger_entry_vw.onst_offst_cd, SUM (amt) AS amount
    10 FROM rpt_horizon_subledger_entry_vw
    11 WHERE rpt_horizon_subledger_entry_vw.bkng_prd = '092008'
    12 AND rpt_horizon_subledger_entry_vw.jrnl_id = 'RCS0002100'
    AND rpt_horizon_subledger_entry_vw.systm_afflt_cd = 'SAFF01'
    13 14 GROUP BY rpt_horizon_subledger_entry_vw.onst_offst_cd,
    15 rpt_horizon_subledger_entry_vw.bkng_prd,
    16 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
    17 rpt_horizon_subledger_entry_vw.jrnl_id,
    18 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
    rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
    rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
    rpt_horizon_subledger_entry_vw.crprt_melob_cd,
    rpt_horizon_subledger_entry_vw.onst_offst_cd; 19 20 21 22
    no rows selected
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=92944 Card=708 Bytes
    =53100)
    1 0 SORT (GROUP BY) (Cost=92944 Card=708 Bytes=53100)
    2 1 VIEW OF 'RPT_HORIZON_SUBLEDGER_ENTRY_VW' (Cost=92937 Car
    d=708 Bytes=53100)
    3 2 SORT (UNIQUE) (Cost=92937 Card=708 Bytes=124962)
    4 3 UNION-ALL
    5 4 HASH JOIN (Cost=46456 Card=354 Bytes=60180)
    6 5 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACCOU
    NT' (Cost=2 Card=57 Bytes=1881)
    7 5 NESTED LOOPS (Cost=46453 Card=354 Bytes=48498)
    8 7 HASH JOIN (Cost=11065 Card=17694 Bytes=1362438
    9 8 HASH JOIN (Cost=27 Card=87 Bytes=5133)
    10 9 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cos
    t=24 Card=87 Bytes=2175)
    11 9 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_
    ACCNT' (Cost=2 Card=111 Bytes=3774)
    12 8 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_LI
    NK' (Cost=11037 Card=142561 Bytes=2566098)
    13 7 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGER_EN
    TRY' (Cost=2 Card=1 Bytes=60)
    14 13 INDEX (UNIQUE SCAN) OF 'SUBLEDGER_ENTRY_PK'
    (UNIQUE) (Cost=1 Card=1)
    15 4 HASH JOIN (Cost=46456 Card=354 Bytes=64782)
    16 15 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACCOU
    NT' (Cost=2 Card=57 Bytes=1881)
    17 15 NESTED LOOPS (Cost=46453 Card=354 Bytes=53100)
    18 17 HASH JOIN (Cost=11065 Card=17694 Bytes=1362438
    19 18 HASH JOIN (Cost=27 Card=87 Bytes=5133)
    20 19 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cos
    t=24 Card=87 Bytes=2175)
    21 19 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_
    ACCNT' (Cost=2 Card=111 Bytes=3774)
    22 18 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_LI
    NK' (Cost=11037 Card=142561 Bytes=2566098)
    23 17 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGER_EN
    TRY' (Cost=2 Card=1 Bytes=73)
    24 23 INDEX (UNIQUE SCAN) OF 'SUBLEDGER_ENTRY_PK'
    (UNIQUE) (Cost=1 Card=1)
    Statistics
    1134 recursive calls
    0 db block gets
    38903505 consistent gets
    598254 physical reads
    60 redo size
    901 bytes sent via SQL*Net to client
    461 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    34 sorts (memory)
    0 sorts (disk)
    0 rows processed
    Thanks a lot in advance
    Jerry

    Hi
    Basically there are two kinds of tables
    - fact
    - lookup
    The number of records in a lookup table is usually small.
    The number of records in a fact table is usually huge.
    However, in test systems the number of records in a fact table is often also small.
    This results in different execution plans.
    I notice again you don't post version and platform info, and you didn't make sure your explain is properly idented
    Please read the FAQ to make sure it is properly idented.
    Also using the word 'buddies' is as far as I am concerned nearing disrespect and rudeness.
    Sybrand Bakker
    Senior Oracle DBA

  • Read ebook on 2 devices??

    I am trying to read my ebooks on a second device, which is a PC (Win7).  Thus I installed "Adobe Digital Editions" when trying to authorize the "Digital Edsitios" for my PC I entered my Adobe-ID & password. Then The following error message ist displayed: "You cannot aithuórize this PC with an Adobe-ID that was used for another PC already". If I select "authorize without ID" ist fails as well.So my question is if there is any way to read the books I bought(!) on more than one device??  Thanks for any hint :-)

    Sometimes ADE gets its registration/activation confused and in a semi-authorized state.
    Uninstalling and reinstalling does not help.
    Unfortunately, it often then gives misleading error messages about what is wrong.
    A common incorrect message informs you that the ID is already in use on another computer and cannot be reused.
    This can often be resolved by completely removing any authorization using ctrl-shift-D to the Library screen on ADE (cmd-shift-D if on Mac).
    Restart ADE, and then reauthorize with your (old) Adobe ID.
    In extreme cases on the mac, the following extra step has helped some people.  Navigate to /Users//Library/Application Support/Adobe/Digital Editions and drag the activation.dat file to the trash. If you are using 10.7, see Access hidden user library files | Mac OS 10.7 Lion. http://forums.adobe.com/thread/1265248?tstart=0

  • Not sure why query is slow

    Hi ,
    below is the result of my tkprof
    SELECT count(*)
      FROM (SELECT a.lotid,
                   SUM(a.release_time - a.step_begin_time) CT,
                   SUM(DECODE(a.location,
                              'ENGRGINV',
                              a.release_time - a.step_begin_time,
                              'FABINV',
                              a.release_time - a.step_begin_time,
                              0)) INV_TIME,
                   SUM(DECODE(a.lot_type,
                              'PX',
                              a.release_time - a.step_begin_time,
                              DECODE(SIGN(a.lot_priority - 4),
                                     0,
                                     a.release_time - a.step_begin_time,
                                     1,
                                     a.release_time - a.step_begin_time,
                                     0))) PXP4_Time
            -- NOTE the decode for lot_priority is assuming that there WON'T be priority greater than 5
             -- ELSE if there's the default for priority - 4 that's <> 0 or 1 will return 0
             -- if there's priority > 5 then need to put it in the decode statement as well
              FROM lotrun a, faboutlot_CT b
             WHERE a.lotid(+) = b.lotid
               AND a.completion_class = 'WIP'
               AND a.production_area = 'CSP-FAB'
             GROUP BY a.lotid) FaboutLotcall count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 2 0.01 0.04 0 0 0 0
    Fetch 1 22.52 1062.36 78407 94384 12 0
    total 4 22.53 1062.40 78407 94384 12 0
    Misses in library cache during parse: 0
    Optimizer goal: RULE
    Parsing user id: 18
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 2 0.01 0.04 0 0 0 0
    Fetch 1 22.52 1062.36 78407 94384 12 0
    total 4 22.53 1062.40 78407 94384 12 0
    Misses in library cache during parse: 0
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 0 0.00 0.00 0 0 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 0 0.00 0.00 0 0 0 0
    Misses in library cache during parse: 0
    1 user SQL statements in session.
    0 internal SQL statements in session.
    1 SQL statements in session.
    Trace file: ora_150179_sbt11.trc
    Trace file compatibility: 8.00.04
    Sort options: default
    0 session in tracefile.
    1 user SQL statements in trace file.
    0 internal SQL statements in trace file.
    1 SQL statements in trace file.
    1 unique SQL statements in trace file.
    78620 lines in trace file.
    Issue :
    It took almost 4 hrs to return me the results
    what i have done :
    1) I have created the neccessary indexes on both LOTRUN (> 22 million rows) :
    LOTRUN_IK15 --> LOTID, STEP_BEGIN_TIME, RELEASE_TIME, LOCATION
    faboutlot_CT (> 500k) :
    FOL_CT_PK1 --> LOTID
    2) have analyzed using dbms_stats
    Ques :
    1. why the disk access is so huge and what could possibly cause it ?
    kinldy advise
    tks & rdgs

    Hi ,
    Basically with or without the outer join it's still very slow
    my index LOTRUN_IK15 in table A contain LOTID, STEP_BEGIN_TIME, RELEASE_TIME, LOCATION
    LOTRUN_IK13 in table A contain RELEASE_TIME, STEP_BEGIN_TIME, COMPLETION_CLASS, LOCATION
    in this case it'll use both index ?
    what i meant from my last question was is it default that Oracle 8i will use only RBO or is it simply dependent on what commands to gather the stats ? i.e if i use ANALYZE then it'll be most efficient for my query to be using RBO's hints and if i used dbms_stats then it'll be most efficent for my query to be using CBO's hints
    tks & rdgs

  • Any idea to downgrade N95??

    Recently i have upgraded my N95 into v30 and when had restoring my files it has stuck and when unplug my cable and go to Gallery it is stuck again, so i have formatted my memory card, reset phone and reformatted my phone again, at least 3 times so it is useless to copy files to my memory?! What should i do now? I want my v20 software, when i had v20 my N95 never had a problem like this! I has worked very well, but now it is getting very slow, I hate that v30 and NOKIA developer team! (

    It's not possible to downgrade yourself. Only a nokia care point can do it and it's not a recommend procedure so they may refuse.
    Sometimes reinstalling the firmware helps it to work better as does resetting it by dialling *#7370# on the main screen. Either of these will wipe all data from your phone.
    Many people have successfully updated to v30 and prefer it to previous versions.
    If none of that helps then visit a care point and ask them to reinstall or possibly downgrade you.
    Care points/service centres and repair info:
    UK • Europe • Asia-Pacific • USA •
    Canada • Middle East and Africa
    Elsewhere: Click here, select your country, go to the support section, then select repair.

  • My iTunes v.10.6.3.25 is intermittently refusing to open. Sometimes re-booting my laptop works, sometimes not. I just put the computer to sleep, and when I woke it up, iTunes started automatically. Any thoughts?

    My iTunes v.10.6.3.25 is intermittently refusing to open. Sometimes re-booting my laptop works, sometimes not. I just put the computer to sleep, and when I woke it up, iTunes started automatically (I had been trying to open it just before by clicking on a song file in my Documents window, and that's the song that started playing when the pc woke up). I went to my iTunes Help and clicked Updates/download iTunes 10.7 twice, but got nothing. Now, Im wondering if I should downloacd the entire 10.7, or whether that would overwrite all my files, erasing my songs. Anybody know? Thanks.

    Hey thanks for replying.
    Here's what I did:
    First I tried the Winsock reset in the Command prompt. Nothing changed.
    Next, I tried the instructions on http://http://support.apple.com/kb/TS4123. The only other program that came up on the 'Winsock Providers' tab on the program was 2 Windows Live applications, which I can do without. So I deleted all Windows Live Applications.
    I did the Winsock reset in the Command Prompt again and rebooted my comp.
    Unfortunately, nothing has changed. iTunes keeps freezing at various stages of the sync, then shows the candy cane-striped bar with either the words 'Finishing sync' or 'Cancelling sync', before showing the Apple logo.
    Sometimes, iTunes gets to the syncing stage - "Copying # of ####" - where it will trudge through the first, second and third tracks before flashing "Copying 4 of ####" for a split second and I catch "Cancelling sync" briefly before the Apple logo appears.
    Again, I've repeated the steps I mentioned in my previous post. Does ANYONE know when the new version of iTunes is set to be released?! This one is driving me INSANE, to say the least!!

  • Firefox has detected that the server is redirecting the request for this address in a way that will never complete. * This problem can sometimes be caused by disabling or refusing to accept cookies.

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    * This problem can sometimes be caused by disabling or refusing to accept
    cookies.

    In my experience this is most of the times a server issue of the website provider.
    Does this error occur on all Websites or just one specific Website?
    Does this Website load in Internet Explorer (or any other Browser?)?

  • Help me urgently please, impossible to open my Mac book air, sometimes he refuse my login, sometimes he goes further but the screen is never uploaded completely, he goes off before, and he take hours for all that, till than he have been perfect...

    I'm having problems to open my Mac, sometimes he refuse my login several times, when I insist he start, very slowly but he never gets to the final, he doesn't upload the screen completely, can you help me? thank you

    BTW (speaking as a Dad of 3 daughters in Grad school) if you don't already have and use a DropBox account, or some other similar online "cloud" based backup of your school documents, you should start doing so immediately. By keeping all of your important documents in the Dropbox folder on your computer, you have instant access to them from any other computer (or iPad), should you be w/o your computer while in for repairs (or if, God forbid, it is stolen). It's free for 2 GB of online storage, which is more than enough for a few years worth of Word documents, etc. (If you get other people to sign up via your email "invitation", then Dropbox gives you even more free storage space.) Every time you close a document, it is updated on the Dropbox servers (encrypted), if it is in the Dropbox folder (assuming you give it a few seconds to update before turning off your computer). Do a google search of "Cloud based storage comparisons" to compare the amount of free space each of the competing services give you.

  • HINTS with CBO Optimizer?

    Hi Experts,
    First of all Merry Chrismas to all ...
    I am confusing in the area of HInts.. My question in that are we using any Hints when Optimizer is  CBO ?( i am using oracle 10g r2)
    bcoz some dba of my project are saying dont ever user Hints if optimizer is CBO. It will Handle the query and will give you most efficient execution plan.
    can you please guide me about this?  and my another question is that if I am writting a select statement and it involve the join of 7 tables(assume)
    then is it necessary to have the proper order of table and where clause if i am using CBO optimizer?
    Thanks in advance,
    Prashant

    1. Your DBA is right. Using Optimizer hints is the path of last resort.
    See: Ask Tom &amp;quot;Hints When to use&amp;quot;
    2. No need to worry about the order of tables, CBO is smart enough to figure that out.
    Suggest you read more about it here:
    https://blogs.oracle.com/optimizer/
    Hinting | Oracle Scratchpad

Maybe you are looking for