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 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: