SQL Performance (MOSC)

MOSC Banner

SQL DELETE RUNS FOR SEVERAL HOURS

edited Feb 19, 2014 12:00PM in SQL Performance (MOSC) 2 commentsAnswered

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.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center