Search notes:

WRH$_SQLTEXT

The column snap_id stores the last snapshot id and is used for purging (see procedure dbms_workload_repository.purge_sql_details).
The column ref_count is not used anymore to reduce contention. Instead, the ref count is tracked in wri$_sqltext_refcount.
(Ref counting is used by clients such as SQL Tuning Sets and Automatic SQL Tuning.)
The primary key columns are dbid,sql_id,con_dbid,snap_id.

See also

wrh$_sqltext_bl
dba_hist_sqltext

Index