how long does the SQL stays in the v$sqlarea or dba_hist_sqltext [message #678932] |
Wed, 22 January 2020 14:38 |
wtolentino
Messages: 421 Registered: March 2005
|
Senior Member |
|
|
how long does the SQL text stays in the v$sqlarea or dba_hist_sqltext? i had a SQL that was in there but after a couple of hours it was not in there anymore. is there also a query to figure out how long it will stay in there? so far the closes that i can see was to check the v$librarycache but could not figure out from there which/how. please advise. thank you in advance.
|
|
|
|
|
|
Re: how long does the SQL stays in the v$sqlarea or dba_hist_sqltext [message #678945 is a reply to message #678943] |
Thu, 23 January 2020 10:34 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
wtolentino wrote on Thu, 23 January 2020 15:39thank you all. looks like in the view dba_hist_sqltext the sql is no longer in there also. That is not right. When you say "no longer there" could it actually be "was never there"? dba_hist_sqltext is not a record of all SQLs, only those that happened to be captured by the AWR snapshots. v$sql is everything - but not for very long.
|
|
|
|