大势趋007

每个人都是🏆
  新随笔  :: 管理

peek timestamp

Posted on 2024-08-12 11:27  大势趋007  阅读(15)  评论(0)    收藏  举报
declare
bindts timestamp;
begin
bindts := systimestamp(); 
execute immediate 'select /* BIND_CAPTURE_TEST */ 1 from dual where :b1 is not null' using bindts;
execute immediate 'select /* BIND_CAPTURE_TEST */ 1 from dual where :b1 is not null' using bindts;
execute immediate 'select /* BIND_CAPTURE_TEST */ 1 from dual where :b1 is not null' using bindts;
end;
/
select * from table(dbms_xplan.display_cursor('1mf1ch9vsr06a',null,format=>'advanced'));

select name, position, datatype_string, was_captured, value_string,anydata.accesstimestamp(value_anydata) 
from v$sql_bind_capture where sql_id in ('1mf1ch9vsr06a);

 案例: