Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger presence KILLS performance

Re: Trigger presence KILLS performance

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 15 Apr 2002 11:26:40 +0100
Message-ID: <1018866358.24439.0.nnrp-10.9e984b29@news.demon.co.uk>

Thomas,

Still does the same on 9.0.1.3 on HP.
I had a closer look - including snapshots of latching and session stats.

In fact the number of redo entries doubles, the number of db block changes doubles,
etc. etc.

Checking the redo log dump, you can see
that when the trigger does not exist, deletes on the index take place as a bulk delete after the deletes from the table. When the trigger exists, oracle does:

    delete row
    delete index
    delete row
    delete index

        etc.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Author of:
Practical Oracle 8i: Building Efficient Databases

Next Seminar - Australia - July/August
http://www.jlcomp.demon.co.uk/seminar.html

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html



Thomas Kyte wrote in message ...

>
>been digging into this. seems to be an issue.
>
>if you do the following:
>
>drop table t;
>create table t as select * from all_objects;
>create index t_idx on t(owner);
>alter session set sql_trace=true;
>delete from t t_with_no_trigger_1 where owner = 'SYS';
>rollback;
>create or replace trigger t_trigger
>before delete on t
>begin
> null;
>end;
>/
>delete from t t_with_trigger_1 where owner = 'SYS';
>rollback;
>
Received on Mon Apr 15 2002 - 05:26:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US