Why the optimizer ignores Index Fast full Scan when much lower cost?

Summary (tracking details below) - to improve the performance of a query on more than one table, I created an index on a table that included all the columns referenced in the query. With the new index in place the optimizer is still choosing a full Table Scan on an Index fast full scan. However, by removing the one query tables I reach the point where the optimizer suddenly use the Index Fast Full Scan on this table. And 'Yes', it's a lot cheaper than the full Table Scan it used before. By getting a test case, I was able to get the motion down to 4 tables with the optimizer still ignoring the index and table of 3, it will use the index.

So why the optimizer not chooses the Index Fast Full Scan, if it is obvious that it is so much cheaper than a full Table Scan? And why the deletion of a table changes how the optimizer - I don't think that there is a problem with the number of join permutations (see below). The application is so simple that I can do, while remaining true to the original SQL application, and it still shows this reversal in the choice of access path. I can run the queries one after another, and he always uses a full Table Scan for the original query and Index fast full scan for the query that is modified with a table less.

Watching trace 10053 output for the two motions, I can see that for the original query 4 table costs alone way of ACCESS of TABLE UNIQUE section a full Table Scan. But for the modified query with a table less, the table now has a cost for an Index fast full scan also. And the end of the join cost 10053 does not end with a message about exceeding the maximum number of permutations. So why the optimizer does not cost the IFFS for the first query, when it does for the second, nearly identical query?

This is potentially a problem to do with OUTER joins, but why? The joins between the tables do not change when the single extra table is deleted.

It's on 10.2.0.5 on Linux (Oracle Enterprise Linux). I did not define special settings I know. I see the same behavior on 10.2.0.4 32-bit on Windows (XP).

Thank you
John
Blog of database Performance

DETAILS
I've reproduced the entire scenario via SQL scripts to create and populate the tables against which I can then run the queries. I've deliberately padded table so that the length of the average line of data generated is similar to that of the actual data. In this way the statistics should be similar on the number of blocks and so forth.

System - uname - a
Linux mysystem.localdomain 2.6.32-300.25.1.el5uek #1 SMP Tue May 15 19:55:52 EDT 2012 i686 i686 i386 GNU/Linux
Database - v$ version
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
PL/SQL Release 10.2.0.5.0 - Production
CORE    10.2.0.5.0      Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
Original query (complete table below details):
SELECT 
    episode.episode_id , episode.cross_ref_id , episode.date_required , 
    product.number_required , 
    request.site_id 
FROM episode 
LEFT JOIN REQUEST on episode.cross_ref_id = request.cross_ref_id 
     JOIN product ON episode.episode_id = product.episode_id 
LEFT JOIN product_sub_type ON product.prod_sub_type_id = product_sub_type.prod_sub_type_id 
WHERE (
        episode.department_id = 2
    and product.status = 'I'
      ) 
ORDER BY episode.date_required
;
Execution of display_cursor after the execution plan:
SQL_ID  5ckbvabcmqzw7, child number 0
-------------------------------------
SELECT     episode.episode_id , episode.cross_ref_id , episode.date_required ,
product.number_required ,     request.site_id FROM episode LEFT JOIN REQUEST on
episode.cross_ref_id = request.cross_ref_id      JOIN product ON episode.episode_id =
product.episode_id LEFT JOIN product_sub_type ON product.prod_sub_type_id =
product_sub_type.prod_sub_type_id WHERE (         episode.department_id = 2 and
product.status = 'I'       ) ORDER BY episode.date_required

Plan hash value: 3976293091

-----------------------------------------------------------------------------------------------------
| Id  | Operation             | Name                | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT      |                     |       |       |       | 35357 (100)|          |
|   1 |  SORT ORDER BY        |                     | 33333 |  1920K|  2232K| 35357   (1)| 00:07:05 |
|   2 |   NESTED LOOPS OUTER  |                     | 33333 |  1920K|       | 34879   (1)| 00:06:59 |
|*  3 |    HASH JOIN OUTER    |                     | 33333 |  1822K|  1728K| 34878   (1)| 00:06:59 |
|*  4 |     HASH JOIN         |                     | 33333 |  1334K|       |   894   (1)| 00:00:11 |
|*  5 |      TABLE ACCESS FULL| PRODUCT             | 33333 |   423K|       |   103   (1)| 00:00:02 |
|*  6 |      TABLE ACCESS FULL| EPISODE             |   299K|  8198K|       |   788   (1)| 00:00:10 |
|   7 |     TABLE ACCESS FULL | REQUEST             |  3989K|    57M|       | 28772   (1)| 00:05:46 |
|*  8 |    INDEX UNIQUE SCAN  | PK_PRODUCT_SUB_TYPE |     1 |     3 |       |  0   (0)|          |
-----------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------
   3 - access("EPISODE"."CROSS_REF_ID"="REQUEST"."CROSS_REF_ID")
   4 - access("EPISODE"."EPISODE_ID"="PRODUCT"."EPISODE_ID")
   5 - filter("PRODUCT"."STATUS"='I')
   6 - filter("EPISODE"."DEPARTMENT_ID"=2)
   8 - access("PRODUCT"."PROD_SUB_TYPE_ID"="PRODUCT_SUB_TYPE"."PROD_SUB_TYPE_ID")
Updated the Query:
SELECT 
    episode.episode_id , episode.cross_ref_id , episode.date_required , 
    product.number_required , 
    request.site_id 
FROM episode 
LEFT JOIN REQUEST on episode.cross_ref_id = request.cross_ref_id 
     JOIN product ON episode.episode_id = product.episode_id 
WHERE (
        episode.department_id = 2
    and product.status = 'I'
      ) 
ORDER BY episode.date_required
;
Execution of display_cursor after the execution plan:
SQL_ID  gbs74rgupupxz, child number 0
-------------------------------------
SELECT     episode.episode_id , episode.cross_ref_id , episode.date_required ,
product.number_required ,     request.site_id FROM episode LEFT JOIN REQUEST on
episode.cross_ref_id = request.cross_ref_id      JOIN product ON episode.episode_id =
product.episode_id WHERE (         episode.department_id = 2     and product.status =
'I'       ) ORDER BY episode.date_required

Plan hash value: 4250628916

----------------------------------------------------------------------------------------------
| Id  | Operation              | Name        | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT       |             |       |       |       | 10515 (100)|          |
|   1 |  SORT ORDER BY         |             | 33333 |  1725K|  2112K| 10515   (1)| 00:02:07 |
|*  2 |   HASH JOIN OUTER      |             | 33333 |  1725K|  1632K| 10077   (1)| 00:02:01 |
|*  3 |    HASH JOIN           |             | 33333 |  1236K|       |   894   (1)| 00:00:11 |
|*  4 |     TABLE ACCESS FULL  | PRODUCT     | 33333 |   325K|       |   103   (1)| 00:00:02 |
|*  5 |     TABLE ACCESS FULL  | EPISODE     |   299K|  8198K|       |   788   (1)| 00:00:10 |
|   6 |    INDEX FAST FULL SCAN| IX4_REQUEST |  3989K|    57M|       |  3976   (1)| 00:00:48 |
----------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------
   2 - access("EPISODE"."CROSS_REF_ID"="REQUEST"."CROSS_REF_ID")
   3 - access("EPISODE"."EPISODE_ID"="PRODUCT"."EPISODE_ID")
   4 - filter("PRODUCT"."STATUS"='I')
   5 - filter("EPISODE"."DEPARTMENT_ID"=2)
Creating the table and Population:
1 create tables
2. load data
3 create indexes
4. collection of statistics
--
-- Main table
--
create table episode (
episode_id number (*,0),
department_id number (*,0),
date_required date,
cross_ref_id varchar2 (11),
padding varchar2 (80),
constraint pk_episode primary key (episode_id)
) ;
--
-- Product tables
--
create table product_type (
prod_type_id number (*,0),
code varchar2 (10),
binary_field number (*,0),
padding varchar2 (80),
constraint pk_product_type primary key (prod_type_id)
) ;
--
create table product_sub_type (
prod_sub_type_id number (*,0),
sub_type_name varchar2 (20),
units varchar2 (20),
padding varchar2 (80),
constraint pk_product_sub_type primary key (prod_sub_type_id)
) ;
--
create table product (
product_id number (*,0),
prod_type_id number (*,0),
prod_sub_type_id number (*,0),
episode_id number (*,0),
status varchar2 (1),
number_required number (*,0),
padding varchar2 (80),
constraint pk_product primary key (product_id),
constraint nn_product_episode check (episode_id is not null) 
) ;
alter table product add constraint fk_product 
foreign key (episode_id) references episode (episode_id) ;
alter table product add constraint fk_product_type 
foreign key (prod_type_id) references product_type (prod_type_id) ;
alter table product add constraint fk_prod_sub_type
foreign key (prod_sub_type_id) references product_sub_type (prod_sub_type_id) ;
--
-- Requests
--
create table request (
request_id number (*,0),
department_id number (*,0),
site_id number (*,0),
cross_ref_id varchar2 (11),
padding varchar2 (80),
padding2 varchar2 (80),
constraint pk_request primary key (request_id),
constraint nn_request_department check (department_id is not null),
constraint nn_request_site_id check (site_id is not null)
) ;
--
-- Activity & Users
--
create table activity (
activity_id number (*,0),
user_id number (*,0),
episode_id number (*,0),
request_id number (*,0), -- always NULL!
padding varchar2 (80),
constraint pk_activity primary key (activity_id)
) ;
alter table activity add constraint fk_activity_episode
foreign key (episode_id) references episode (episode_id) ;
alter table activity add constraint fk_activity_request
foreign key (request_id) references request (request_id) ;
--
create table app_users (
user_id number (*,0),
user_name varchar2 (20),
start_date date,
padding varchar2 (80),
constraint pk_users primary key (user_id)
) ;

prompt Loading episode ...
--
insert into episode
with generator as 
(select rownum r
          from (select rownum r from dual connect by rownum <= 1000) a,
               (select rownum r from dual connect by rownum <= 1000) b,
               (select rownum r from dual connect by rownum <= 1000) c
         where rownum <= 1000000
       ) 
select r, 2,
    sysdate + mod (r, 14),
    to_char (r, '0000000000'),
    'ABCDEFGHIJKLMNOPQRSTUVWXYZ' || to_char (r, '000000')
  from generator g
where g.r <= 300000
/
commit ;
--
prompt Loading product_type ...
--
insert into product_type
with generator as 
(select rownum r
          from (select rownum r from dual connect by rownum <= 1000) a,
               (select rownum r from dual connect by rownum <= 1000) b,
               (select rownum r from dual connect by rownum <= 1000) c
         where rownum <= 1000000
       ) 
select r, 
       to_char (r, '000000000'),
       mod (r, 2),
       'ABCDEFGHIJKLMNOPQRST' || to_char (r, '000000')
  from generator g
where g.r <= 12
/
commit ;
--
prompt Loading product_sub_type ...
--
insert into product_sub_type
with generator as 
(select rownum r
          from (select rownum r from dual connect by rownum <= 1000) a,
               (select rownum r from dual connect by rownum <= 1000) b,
               (select rownum r from dual connect by rownum <= 1000) c
         where rownum <= 1000000
       ) 
select r, 
       to_char (r, '000000'),
       to_char (mod (r, 3), '000000'),
       'ABCDE' || to_char (r, '000000')
  from generator g
where g.r <= 15
/
commit ;
--
prompt Loading product ...
--
-- product_id prod_type_id prod_sub_type_id episode_id padding 
insert into product
with generator as 
(select rownum r
          from (select rownum r from dual connect by rownum <= 1000) a,
               (select rownum r from dual connect by rownum <= 1000) b,
               (select rownum r from dual connect by rownum <= 1000) c
         where rownum <= 1000000
       ) 
select r, mod (r, 12) + 1, mod (r, 15) + 1, mod (r, 300000) + 1,
       decode (mod (r, 3), 0, 'I', 1, 'C', 2, 'X', 'U'),
       dbms_random.value (1, 100), NULL
  from generator g
where g.r <= 100000
/
commit ;
--
prompt Loading request ...
--
-- request_id department_id site_id cross_ref_id varchar2 (11) padding 
insert into request
with generator as 
(select rownum r
          from (select rownum r from dual connect by rownum <= 1000) a,
               (select rownum r from dual connect by rownum <= 1000) b,
               (select rownum r from dual connect by rownum <= 1000) c
         where rownum <= 10000000
       ) 
select r, mod (r, 4) + 1, 1, to_char (r, '0000000000'),
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789' || to_char (r, '000000'),
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789012345678' || to_char (r, '000000')
  from generator g
where g.r <= 4000000
/
commit ;
--
prompt Loading activity ...
--
-- activity activity_id user_id episode_id request_id (NULL) padding 
insert into activity
with generator as 
(select rownum r
          from (select rownum r from dual connect by rownum <= 1000) a,
               (select rownum r from dual connect by rownum <= 1000) b,
               (select rownum r from dual connect by rownum <= 1000) c
         where rownum <= 10000000
       ) 
select r, mod (r, 50) + 1, mod (r, 300000) + 1, NULL, NULL
  from generator g
where g.r <= 100000
/
commit ;
--
prompt Loading app_users ...
--
-- app_users user_id user_name start_date padding 
insert into app_users
with generator as 
(select rownum r
          from (select rownum r from dual connect by rownum <= 1000) a,
               (select rownum r from dual connect by rownum <= 1000) b,
               (select rownum r from dual connect by rownum <= 1000) c
         where rownum <= 10000000
       ) 
select r, 
       'User_' || to_char (r, '000000'),
       sysdate - mod (r, 30),
       'ABCDEFGHIJKLMNOPQRSTUVWXYZ' || to_char (r, '000000')
  from generator g
where g.r <= 1000
/
commit ;
--

prompt Episode (1)
create index ix1_episode_cross_ref on episode (cross_ref_id) ;
--
prompt Product (2)
create index ix1_product_episode on product (episode_id) ;
create index ix2_product_type on product (prod_type_id) ;
--
prompt Request (4)
create index ix1_request_site on request (site_id) ;
create index ix2_request_dept on request (department_id) ;
create index ix3_request_cross_ref on request (cross_ref_id) ;
-- The extra index on the referenced columns!!
create index ix4_request on request (cross_ref_id, site_id) ;
--
prompt Activity (2)
create index ix1_activity_episode on activity (episode_id) ;
create index ix2_activity_request on activity (request_id) ;
--
prompt Users (1)
create unique index ix1_users_name on app_users (user_name) ;
--
prompt Gather statistics on schema ...
--
exec dbms_stats.gather_schema_stats ('JB')
10053 sections - original query
***************************************
SINGLE TABLE ACCESS PATH
  -----------------------------------------
  BEGIN Single Table Cardinality Estimation
  -----------------------------------------
  Table: REQUEST  Alias: REQUEST
    Card: Original: 3994236  Rounded: 3994236  Computed: 3994236.00  Non Adjusted: 3994236.00
  -----------------------------------------
  END   Single Table Cardinality Estimation
  -----------------------------------------
  Access Path: TableScan
    Cost:  28806.24  Resp: 28806.24  Degree: 0
      Cost_io: 28738.00  Cost_cpu: 1594402830
      Resp_io: 28738.00  Resp_cpu: 1594402830
******** Begin index join costing ********
  ****** trying bitmap/domain indexes ******
  Access Path: index (FullScan)
    Index: PK_REQUEST
    resc_io: 7865.00  resc_cpu: 855378926
    ix_sel: 1  ix_sel_with_filters: 1
    Cost: 7901.61  Resp: 7901.61  Degree: 0
  Access Path: index (FullScan)
    Index: PK_REQUEST
    resc_io: 7865.00  resc_cpu: 855378926
    ix_sel: 1  ix_sel_with_filters: 1
    Cost: 7901.61  Resp: 7901.61  Degree: 0
  ****** finished trying bitmap/domain indexes ******
******** End index join costing ********
  Best:: AccessPath: TableScan
         Cost: 28806.24  Degree: 1  Resp: 28806.24  Card: 3994236.00  Bytes: 0
***************************************
10053 - updated the Query
***************************************
SINGLE TABLE ACCESS PATH
  -----------------------------------------
  BEGIN Single Table Cardinality Estimation
  -----------------------------------------
  Table: REQUEST  Alias: REQUEST
    Card: Original: 3994236  Rounded: 3994236  Computed: 3994236.00  Non Adjusted: 3994236.00
  -----------------------------------------
  END   Single Table Cardinality Estimation
  -----------------------------------------
  Access Path: TableScan
    Cost:  28806.24  Resp: 28806.24  Degree: 0
      Cost_io: 28738.00  Cost_cpu: 1594402830
      Resp_io: 28738.00  Resp_cpu: 1594402830
  Access Path: index (index (FFS))
    Index: IX4_REQUEST
    resc_io: 3927.00  resc_cpu: 583211030
    ix_sel: 0.0000e+00  ix_sel_with_filters: 1
  Access Path: index (FFS)
    Cost:  3951.96  Resp: 3951.96  Degree: 1
      Cost_io: 3927.00  Cost_cpu: 583211030
      Resp_io: 3927.00  Resp_cpu: 583211030
  Access Path: index (FullScan)
    Index: IX4_REQUEST
    resc_io: 14495.00  resc_cpu: 903225273
    ix_sel: 1  ix_sel_with_filters: 1
    Cost: 14533.66  Resp: 14533.66  Degree: 1
******** Begin index join costing ********
  ****** trying bitmap/domain indexes ******
  Access Path: index (FullScan)
    Index: IX4_REQUEST
    resc_io: 14495.00  resc_cpu: 903225273
    ix_sel: 1  ix_sel_with_filters: 1
    Cost: 14533.66  Resp: 14533.66  Degree: 0
  Access Path: index (FullScan)
    Index: IX4_REQUEST
    resc_io: 14495.00  resc_cpu: 903225273
    ix_sel: 1  ix_sel_with_filters: 1
    Cost: 14533.66  Resp: 14533.66  Degree: 0
  ****** finished trying bitmap/domain indexes ******
******** End index join costing ********
  Best:: AccessPath: IndexFFS  Index: IX4_REQUEST
         Cost: 3951.96  Degree: 1  Resp: 3951.96  Card: 3994236.00  Bytes: 0
***************************************

I mentioned that it is a bug related to the ANSI SQL standard and transformation probably.

As suggested/asked in my first reply:
1. If you use a no_query_transformation then you should find that you get the use of the index (although not in the plan you would expect)
2. If you use the traditional Oracle syntax, then you should not have the same problem.

Tags: Database

Similar Questions

  • When Oracle make Index Fast full Scan?

    Hi all

    In this case, Oracle index full scan. Please give the solution with at least two example.

    Thank you

    Oops,

    Spleen it was INDEX FAST FULL SCAN. Then index must be greater:

    SQL > create table tbl in select * from dba_objects;

    Table created.

    SQL > alter table tbl
    2 edit object_name not null;

    Modified table.

    SQL > create index tbl_idx1 on tbl (object_name);

    The index is created.

    SQL > explain the plan for
    2. Select object_name in tbl;

    He explained.

    SQL > select * from table (dbms_xplan.display);

    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------
    Hash value of plan: 2675010997

    ---------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ---------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT |          | 69022 |  4448K |   109 (1) | 00:00:02 |
    |   1.  FULL RESTRICTED INDEX SCAN FAST | TBL_IDX1 | 69022 |  4448K |   109 (1) | 00:00:02 |
    ---------------------------------------------------------------------------------

    Note
    -----

    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------
    -dynamic sample used for this survey (level = 2)

    12 selected lines.

    SQL >

    SY.

  • Why the time display is set to 19 when I run the attached VI

    Why the time display is set to 19 when I run the attached VI?

    Thank you.

    Seconds function Date/time returned to 12/31/1903, as UTC is false.  Set the Boolean value TRUE (UTC)

  • Can not find why the startup disk is almost full

    I got the message "Boot disk almost full" and began to go through the folders. I did an EEG info on my user folder and it says 240gig, my drive is only 250 gig. But when I go through each subfolder that I can't find anything even close to that of grand. I deleted everything that I don't need but can't find where this huge amount of file space is used.

    Simple answer - don't count on the Finder.

    The Finder hides just pieces of the file system that are not relevant for most users.

    When there is only a big gap between what the OS reports is used (240GB) and what you see in the Finder, is most often due to some errant logging process that fills the system logs, with mostly useless data.

    You can view the logs (and other 'hidden' data) using the Finder go-> go to folder... menu and entering: / var

    You can also use /Applications/Utilities/Console.app to view the logs to see if you can identify what process is at fault.

  • Why the videos play too fast and with no sound?

    I tried the update of flash player and that has not worked. All the other audio seems to work very well. Problem is when I try to video streams from youtube etc the video plays in fast speed and there is no audio data

    Since Youtube uses flash player for videos, completely uninstall Flash, then reinstall the latest version and see if the problem persists:

    Uninstall Flash Player | Windows:
    http://kb2.Adobe.com/CPS/141/tn_14157.html

    Install the latest version of Flash:
    http://get.Adobe.com/flashplayer/

    Installation problems | Flash Player | Windows:

    http://kb2.Adobe.com/CPS/191/tn_19166.html

  • Why the DR unit does not trigger schema when it is called remotely?

    Hi all

    I have a question about the triggers of oracle schema and I would be grateful if you could kindly give me a helping hand.

    Oracle version: 11 GR 2 (11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit)

    OS:                      Linux Fedora Core 17 (X86_64)

    I was reading the online documentation on schema triggers where oracle says:

    Assume that users user1 and user2 own schema triggers and user1 invokes a DR unit owned by user2. Inside the DR unit, User2 is the current user. Therefore, If the DR unit triggers the triggering event of a trigger schema that User2 owns, while the trigger is activated.

    I wanted to see this behavior in practice, so I made the following test case:

    -There are two schemas:

    • testuser where I create a procedure with AUTHID DEFINE (a unit of the Dr. therfore) named createTab. This procedure takes a table name as a parameter and if no table with this name exists already in the testuser schema, it will create a new table with the same name with a single column of type NUMBER (well, it's just an example to this issue, in practice I never create my tables this way)

    • training is therefore another scheme to which we grant the privilege EXECUTE on the above mentioned procedure createTab so that it may be possible to create tables on schema testuser by calling the remote procedure.

    The idea behind the test is to create a schema for testusertrigger, so that whenever he is, for example, a creation of the table, a message is inserted into a table of newspaper (just an example to show proof that trigger the diagram has been drawn on the table creation event). Now assuming I admit the EXECUTE privilege on the procedure of createTab for the trainingscheme, then any creation of the remote table must trigger the schema trigger, because according to the documentation inside the unit of the DR, the user is not considered appellant user (= training) but actually the owner (= testuser) that created the trigger and procedure.

    The problem is that I cannot see it in my test. Therefore I will write here my test case so that you can have a look at it and to indicate where I did wrong, and what I misunderstood in the documentation.

    So here's what I created on the schema testuser

    Code

    SET SQLBLANKLINES

    ALTER SESSION SET PLSQL_WARNINGS = ' ENABLE: ALL ';

    SET SERVEROUTPUT ON;

    -A table of newspaper in which the schema trigger inserts messages


    -indicating that the schema trigger was triggered (as proof)

    CREATE TABLE tablog (logMsg VARCHAR2 (100));

    -Here is the procedure that updates the above defined log table (tablog)

    -This procedure (autonomous transaction) is called by the schema trigger

    CREATE OR REPLACE PROCEDURE updateLog (p_logMsg IN tablog.logMsg%TYPE)

    DEFINE AUTHID

    IS

    PRAGMA AUTONOMOUS_TRANSACTION;

    BEGIN

    INSERT INTO tablog (logMsg) VALUES (p_logMsg);

    COMMIT;

    END updateLog;

    /

    DISPLAY ERRORS;

    -This is the procedure we use to create tables (which will be called so

    -remotely from another schema-> training)

    -As stated above, the procedure takes a table
    -name as a parameter and creates a table with a single column of type NUMBER

    -that if no table with this name exists already

    CREATE OR REPLACE PROCEDURE createTab

    (

    p_tabName IN user_tables.table_name%TYPE

    )

    AUTHID DEFINE - Therefore a unit DR that we explicitly specify AUTHID DEFINE

    IS

    BEGIN

    < < bk > >

    DECLARE

    tabName user_tables.table_name%TYPE;

    BEGIN

    -Check to see if a table with the name p_tabName
    -already exists

    T1.table_name SELECT INTO bk.tabName

    FROM user_tables t1

    WHERE t1.table_name = upper (p_tabName);

    EXCEPTION

    -No table with this name exists, so we create now

    WHEN NO_DATA_FOUND THEN

    IMMEDIATELY RUN 'CREATE TABLE ' |

    p_tabName | '(NUMÉRO n) ';

    END;

    END createTab;

    /

    DISPLAY ERRORS;

    - And finally it is the schema for the schema 'testuser '.

    -Any appeal of the above mentioned procedure createTab (if the procedure)
    -creates a new table) fires the following trigger

    CREATE OR REPLACE TRIGGER testuser_schema_tr

    Before you CREATE on testuser.schema

    BEGIN

    -Just insert a message into the table of the newspaper showing the evidence
    -that our schema trigger wiped of CREATE TABLE
    -statements

    updateLog

    (

    TO_CHAR (sysdate, ' ' MON-DD-YYYY HH24:Mi:ss) |

    ' ': Schema for testuser trigger pulled.

    );

    END testuser_schema_tr;

    /

    DISPLAY ERRORS;

    -I grant the privileges required for the formation of the user/schema
    -may also be able to remotely run my procedure

    GRANT EXECUTE ON createTab to training;

    GRANT SELECT ON tablog to training;

    First, I tested the procedure createTab locally (so be etre connecte connected as drawing testuser , in other words, the owner of the procedure and the relaxation). Everything worked pretty well and created table, that table the journal has been updated by the trigger which showed that in fact after each CREATE TABLE statement, the trigger was activated.

    However, when I opened a new SQL * Plus term, this time in being connected as a training scheme, I have observed that, once again, it was possible to create tables on schema testuser remotely, but the log table has been updated no more, which means that the trigger has not wiped CREATE TABLE statements that were issued remotely (by remote createTab procedure call).

    Code

    SQL > EXECUTE testuser.createTab ('tmptab');

    PL/SQL procedure successfully completed.

    SQL > SELECT * FROM testuser.tablog;

    no selected line

    SQL > USER to see THE

    The USER is 'TRAINING'


    SQL >

    Any idea? Why unity DR (createTab procedure) does not have the schema trigger, unlike what documents said, when it is called remotely?

    Thanks in advance,

    Dariyoosh

    It works for me on Oracle 11.2.0.3

    August 21, 2013 18:10:12: trigger pulled schema

    But not on 11.2.0.1

    It looks like a bug.

  • Why the Secure areas not at my disposal when I manage my site?

    I just rebuilt my site in Muse and transferred to the Cat Business. I tried to add a protected area, but the option does not exist. Is it a thing of Muse and admin thing?Screen Shot 2015-11-07 at 8.56.56 AM.png

    Hey, I suggest to contact support if the problem persists. In addition, mention the URL of the site and the user name, that you connect to when the safe areas is not displayed.

    Kind regards

    Mihai

  • Why the Windows performance index stops working during the performance of the Aero from Direct3D 9 assessment?

    All the drivers are up to date. System: Intel T2400, 512 MB Ram, Nvidia GeForce Go 7400 192 MB (128 MB dedicated), Windows 7 32 bit. Also here is the last section of the report winsat under Windows\Performance\Winsat. Thank you in advance.

    2153905 (3272) - winsat\logging.cpp:0815:-START 2009\12\4 13:36:54 -
    2154093 (3272) - winsat\main.cpp:4301: command line = "C:\Windows\system32\winsat.exe" formal - CancelEvent 1b975d4c-b5de-43d5-97ff-d7d2096d0fa6
    2154233 (3272) - winsat\processwinsaterror.cpp:0095: ERROR: tried to read resource strings, unknown exception occurred
    2154483 (3272) - winsat\main.cpp:4474: > IsFormal is TRUE IsMoobe = FALSE.
    2154576 (3272) - 4585: Watch dog system active
    2154576 (3272) - winsat\main.cpp:4600: watch dog timer 600.0 seconds hand
    2157883 (3272) - winsat\main.cpp:2490: > DWM running.
    2165902 (3272) - winsat\main.cpp:2497: > turn off DWM.
    2166011 (3272) - 2470: > EMD service will be restored to the exit.
    2168070 (3272) - 0983: > read the active power as «8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c» mode
    2168179 (3272) - 2793: > power policy saved.
    2171939 (3272) - winsat\syspowertools.cpp:1015 >: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c value of the power system active"
    2171955 (3272) - winsat\main.cpp:2814: > policy set to maximum power.
    2173171 (3272) - winsat\logging.cpp:1763: ERROR: phase enter/leave imballance
    2173171 (3272) - winsat\main.cpp:0948: > IsOfficial = TRUE IsFormal = TRUE IsMoobe = FALSE RanOverTs = FALSE RanOnbatteries = FALSE
    2173187 (3272) - winsat\main.cpp:1775: > Run Assessment features
    2173624 (3272) - winsat\main.cpp:1775: > Run Assessment dwm - aname DWM-time 10 - fbc 10 - disp off - normalw 12 - width 1280 - height 1024 - winwidth C (1144) winheight - C (915) - rendertotex 6 - rtdelta 3 - nolock

    Hello MutluSimsek,

    Thanks for posting on the Microsoft answers Forums.

    Using his computer in a clean boot State.  Then open a command prompt (type cmd, then run as administrator).

    WinSAT formal type

    Press ENTER.

    I hope that this answer to your questions, if you need further assistance please come back and post, we are more than happy to help you.

    Kind regards

    Edgar
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Why the photos from my iPhone 6 fuzzy when I transfer to iPhoto

    I'm uploading photos from my phone to the Photos on my Mac.  Why they are blurred and the quality is poor. Should also

    We cannot see if you must provide details and context - what operating system are you using (you say OS X 10.8.2 but also Photos of State, which is not possible)

    Exactly how you download?

    What are the dimensions in pixels of the blurry photos

    LN

  • Why the DNS cache would have entered negative when connecting?

    Hello

    Thanks in advance for reading this.

    I have a problem when DNS cache contains negative entries to our Exchange Server, the file server / printing and even some among the domain controllers.  I tried to completely flush the cache by using the ipconfig/flushdns command, and then view the result with the ipconfig/displaydns command which will leave only the local host entries.  After that I have to reboot the machine, the negative entries are here once again and I cannot ping the servers exchange or print file.  Nslookup works fine however and resolves names without problem.  When I rinse again and then try clicking, it works for awhile but then the negative entries will appear again while I'm connected.  What makes it more interesting, is that it is not always the same negative records that appear.

    Things that did not help I tried:

    1. rebuilt laptop client using a different material.  This leads me to believe that this isn't related viruses/spyware since it happened immediately after setting a cell phone completely new with a new build of Windows XP.
    2. added to ipconfig/flushdns to the logon script.

    Info about my environment:

    1. we have all our servers in one location on the desktop, and all branches are connected via the VPN site-to site.
    2 the client machine is added to the domain and is running Windows XP SP3.
    3. this question is not present on the main site, only in branches.
    4. the branches using Sonicwall TZ 200 units for DHCP.
    5. it may be a coincidence, but this problem seems to have happened since we went from Sonicwall TZ 170 s to TZ 200
    but I do not see how it would affect the cache.
    6 I emptied the cache, and then more minutes late the negative entries will appear again even if pings worked a few minutes earlier.  It doesn't seem to be a physical problem because my RDP session is never the problem while I'm troubleshooting.

    If anyone has any idea as to why negative cache entries will appear when the physical network is fine, and when nslookup is no problem to find the servers, I would be very grateful for your input.

    Hi ethorneloe,

    Since your question involves the use of Exchange Server please join the TechNet community for assistance. They specialize in THIS type of environment Pro and will be better suited to help you.

    TechNet Forum

    http://social.technet.Microsoft.com/forums/en-us/category/ExchangeServer/

  • Why the horizontal scroll bar does not disappear when windows are maximized, but reappears when minimize?

    I'm a fool to the computer. I fix my car and I don't fix my computer. If there is no easy solution, I'll pay someone to do it for me. So, is there an easy way to retrieve my horizontal scroll bar? I've updated to the latest Firefox (35). I restored my computer to an earlier date when everything was ok. I downloaded another browser (Chrome) to see if that would fix it. Nothing has worked. The system I use is Windows 7 64 bit. I tried not to do anything, because this has led to big problems in the past. Suggestions, or I need to take the machine to my fix - it person?

    Thanks for any assistance yu might be able to provide.

    Bingo! You have reason, cor - el. Thank you.

    I never noticed this before. Sometimes (when I'm too lazy to get up and do my glasses or cannot find them) I just increase the size of the window.

    To me it seemed that the scroll bar was still there, and then it wasn't. Hours lost, but a lesson learned. I did not mention that I am a fool to the computer, I don't?

    Thank you!!!

  • Why the size of my document is double when I save as a doc file?

    Hi guys, I'm puzzled.

    I have a doc pages file which is 13.3 MB (the right size for the download of Smashwords).

    Edit: 2 photos no were not "in line with the text" set.

    I re saved this document in a new empty file.

    Now it's 26 MB (too big to download)

    It is a mystery to me. What made the biggest file? There is no additional fonts or images.

    Any help will give me a cool day and hope for my title.

    And heal my heart.  This made me so much frustration.

    Thanks in advance.

    Open the Word document that you exported from the Pages of LibreOffice Writer or MS Word and then he re-record. The file size will be reduced by a wide margin.

    The terribly complex and exclusive internal document format that now uses the Pages causes swollen exports Word for translation.

    I can create a new document Pages v5.6.2 by using a blank template. I can type the letter 'A' in it and then export it to Word (.docx). The file size will be approximately 494 KB. It's true bloat.

  • Why the scroll bar arrows disappeared from Firefox when I upgraded from Fedora 17 to 18 years?

    Recently, I upgraded from Fedora 17 to 18 of Fedora. Before the update, Firefox worked perfectly. Now, the arrows have disappeared of the scrollbar on the right. How can I get back them?

    This problem is not moved in other applications - in Firefox.

    Alternatively, you can check for problems with the file localstore.rdf.

    Do you have a scroll bar (that is, only the buttons have disappeared)?

    You use the default theme of Firefox (Tools > Modules > appearance)?

    You can attach a screenshot?

    Use a type of compressed as PNG or JPG image to save the screenshot.

    You can try to check if another theme or icon pack Linux brings them back.

  • Why the drive to continue working without interruption when firefox works

    Hard drive are permanently being exploited so that firefox is running. The racket stops when firefox closes.

    You may have a faulty extension or malware. Follow these steps:

  • Why the html title tags does not display when hovering

    I see my title tags in ie, chrome, and opera. They stopped to display in firefox after updating to version 3.6.5

    Problems with ToolTips not working not properly have been reported to be due to the Google toolbar (Tools > Modules > Extensions)

    You can check if there is an update is available that solves this problem.

    You can try to uninstall and reinstall the last GT, which has been reported to work.

    See also the extensions, themes and problems of hardware acceleration to resolve common troubleshooting Firefox problems

Maybe you are looking for

  • iTunes cannot read the contents of the iPod

    On a model MC540LL/A iPod running iOS 6.1.6 I get this alert: iTunes cannot read the contents of the iPod "IPod of Carl Carlson". Go to the summary in the iPod preferences tab and click on restore to restore the iPod to factory settings. There is no

  • HARD MK5055GSX drive is more right?

    Hi all I'm looking for a replacement of the internal hard drive for my satellite u500 (which comes from the FSU). The MK5055GSX is made, I am struggling to know which hard drive internal to buy that would work with my laptop (i.e. what model replaced

  • How can I register clips unrelated

    Some of the clips I divided that were formerly connected are now independent and I cannot "meet" their return. I want to join these clips together so that I complete my film in the sections. Thanks in advance for the help.

  • Guaranteed + hard drive failure

    Hi, my hard drive is about to fail not, but my laptop is more than 1 year, so no warranty for the laptop. Since the problem is with the drive HARD only I thought it might have a different length of the warranty. Is this true? I read that the life exp

  • FN feature and HD DVD on Satellite A200 software

    Hi all I have a Satellite A200-1, which I've updated with Win7. It is great because Vista gave me problems that have been solved with Win 7.As with some of the posts I read, my FN key doesn't work anymore and I can't seem to install the HD DVD softwa