Explain Plan x Update/Delete

Gustavo

Member³
I think this used to work fine before last version. If I select an Update or Delete from a program and try to Explain Plan, I get "ORA-00904: "V_ID_REG": invalid identifier".

Code:
Delete nxt_arq_imei
     where id_reg = v_id_reg
I believe a collon used to be added to each variable.
 
No, automatic bind variable replacement only works for select statements. You will have to do this manually for updates, deletes and inserts.
 
Really? I could swear this used to work. :p
Could you place this as an enhancement request?

On the other hand, I see vectors are now replaced by :var1, :var2... This helps a lot!

Regards,
Gustavo
 
Hi, Marco,

Please, could you enhance this for v9 final release? I have to do this a lot. Why suppose only SELECT statements should have performance checked?!? This is the error I get now:
Code:
ORA-00904: nome inv
 
We'll see what we can do. The problem is that update statements cannot be as easily parsed as select statements.
 
Last edited:
Maybe a partial approach... What if you handle only the WHERE clause like you do for select statements? This would be enough for DELETE statements and would also handle most of the UPDATEs.
 
Back
Top