Oracle SQL tuning useful sql statements

  1. View full sql text
SELECT p.sql_fulltext FROM gv$locked_object l, gv$session s, gv$sqlarea p WHERE l.session_id = s.sid and s.sql_id = p.sql_id;

2. View table and lock related information

SELECT distinct