SQL DELETE RUNS FOR SEVERAL HOURS
Hi all I have the following situation.: our development team implemented a pl/sql that purges records on some tables of the database. Basically what it does is
DELETE FROM ACA_ENVIOS_SOLICITUDES_ENV WHERE ENV_ID <= :V_ENV_ID;
where v_env_id is a variable that was previously assigned.
This table is referenced by thre foreign keys, and on each of the tables that holds the fk is an index which first column is the one on which is definded the fk.
So what I think is, for each rows to be deleted, Oracle wil check if th fk is stil valid, otherwise it will raise an exception. An dto do this validation will use the indexes previously mentioned.