下面这个SQL,在8174上很快,但在9204上很慢.
select aaa from tabname
where sfzh = username.pg_name.functionname(bbb);
其中:
select aaa from tabname where sfzh = ... 很快.
单独调用 username.pg_name.functionname(bbb)也很快.
修改成:
ccc := username.pg_name.functionname(bbb);
select aaa from tabname
where sfzh = ccc
就正常了.
估计是oracle sql编译器的bug.