shockshell
Programmer
Hello everybody,
i have a problem with, from my point of view simple insert - select statement. It takes nearly 20 minutes to finish, on an good equipped server. At first i thought the selection would take so long, but this is done in nearly five seconds. The rest of the time is spend for saving the resultsset (7500 rows) into the result table. The table itself has three (row, no function) indexes and one before insert trigger for selecting a sequence index. I also tried oracle hints (+append) but nothing changed. I'm not an oracle crack so if anyone has an idea of what is going wrong please help. For completeness i will post my statement.
i have a problem with, from my point of view simple insert - select statement. It takes nearly 20 minutes to finish, on an good equipped server. At first i thought the selection would take so long, but this is done in nearly five seconds. The rest of the time is spend for saving the resultsset (7500 rows) into the result table. The table itself has three (row, no function) indexes and one before insert trigger for selecting a sequence index. I also tried oracle hints (+append) but nothing changed. I'm not an oracle crack so if anyone has an idea of what is going wrong please help. For completeness i will post my statement.
Code:
insert into
tbl_errorcases_ata
(rental_contract_no,type_id,referenced_value,topla_id,region)
select
fahrauftragsnummer,errortype,referenced_value,tid,region
from
QRY_ATA_ACTUAL_ERROR_CASES errors
where
not exists (select
topla_id
from
TBL_ERRORCASES_ATA
where
rental_contract_no=errors.fahrauftragsnummer and
referenced_value=errors.referenced_value and
type_id=errors.errortype and
region=errors.region
);