Search notes:

AT sign followed by an exclamation point (@!) in column FILTER_PREDICATES of PLAN_TABLE

When a query is executed over a database link, it's possible to add an at sign and exclamation point to the functions user and sysdate (user@! and sysdate@!) to tell Oracle to evaluate these functions locally rather than on the remote datebase.
This syntax can also be used if a query is executed locally (i.e. without using a database link) to explicitly state to evaluate these two functions locally (which of course does not really make sense):
select
   user       a,
   user@!     b,
   sysdate    c,
   sysdate@!  d
from
   dual;
If a query predicate (where condition) uses sysdate or user for comparison purposes, the plan_table column filter_predicates lists these functions as user@! and sysdate@!.
Create a demonstration table
create table tq84_user_values (
   user_name   varchar2(128) not null,
   valid_from  date          not null,
   value       number(7,2)   not null
);
And two views with user or sysdate in their predicate:
create view  tq84_my_values as
select
   valid_from,
   value
from
   tq84_user_values
where
   user_name = user;
 
create view tq84_my_current_value as
select
   value
from (
   select
      value,
      row_number() over (order by valid_from desc) r
   from
      tq84_my_values
   where
      valid_from <= sysdate
)
where
   r = 1;
Explain the execution plan for select * from tq84_my_current_value:
explain plan
   set statement_id = '@!'
for
select
   *
from
   tq84_my_current_value;
We find the values USER@! and SYSDATE@! in the column filter_predicates of the plan_table:
column op                 format a30
column object_name        format a20
column filter_predicates  format a70

select
   rpad(' ', 2*depth) || operation || ' ' || options op,
   object_name,
   filter_predicates
from
   plan_table
where
   statement_id = '@!';
--
-- OP                             OBJECT_NAME          FILTER_PREDICATES                                                     
-- ------------------------------ -------------------- ----------------------------------------------------------------------
-- SELECT STATEMENT
--   VIEW                                              "R"=1                                                                 
--     WINDOW SORT PUSHED RANK                         ROW_NUMBER() OVER ( ORDER BY "VALID_FROM" DESC )<=1                   
--       TABLE ACCESS FULL        TQ84_USER_VALUES     "USER_NAME"=USER@! AND "VALID_FROM"<=SYSDATE@!   
When using dbms_xplan to display the execution plan, @! shows up in the Predicate Information section:
select * from dbms_xplan.display(statement_id => '@!');
--
-- ---------------------------------------------------------------------------------------------
-- | Id  | Operation                | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
-- ---------------------------------------------------------------------------------------------
-- |   0 | SELECT STATEMENT         |                  |     1 |    26 |     3  (34)| 00:00:01 |
-- |*  1 |  VIEW                    |                  |     1 |    26 |     3  (34)| 00:00:01 |
-- |*  2 |   WINDOW SORT PUSHED RANK|                  |     1 |    88 |     3  (34)| 00:00:01 |
-- |*  3 |    TABLE ACCESS FULL     | TQ84_USER_VALUES |     1 |    88 |     2   (0)| 00:00:01 |
-- ---------------------------------------------------------------------------------------------
--  
-- Predicate Information (identified by operation id):
-- ---------------------------------------------------
--  
--    1 - filter("R"=1)
--    2 - filter(ROW_NUMBER() OVER ( ORDER BY "VALID_FROM" DESC )<=1)
--    3 - filter("USER_NAME"=USER@! AND "VALID_FROM"<=SYSDATE@!)

See also

Using sysdate@! in a query where database links are involved.

Index