Manually execute the exact SQL from a SQL_ID
We are on Oracle 19c and have a stored procedure with multiple calls. One of the SELECT INTO statements is problematic and is taking more time than expected. By copying, pasting, and running the SQL, I get a different SQL_ID. I'd like to ensure that my test runs are EXACTLY the same as the SQL_ID for which I see the slowness.
I'm wanting to grab the exact SQL, run it, and see additional info in gv$sqlstats for that specific SQL_ID. Anyone know how to grab the exact sql from a sql_id?