1

I have two users - user1,user2.

Both have been given a Grant of select on a view say view1 created by some other user say manager1.

Now user1 and user2 both have created synonym on the manager1's view so that they don't require to query using manager1.view_name but just using view name.

CREATE OR REPLACE SYNONYM user1.view_name1 FOR manager1.view_name1;

Now My question is the same query is taking much longer time when executed under user1 but is taking less than a second when executed under user2.

I tried different combinations and different order of execution to avoid caching issues. But in vain. Please help.

Taking around 10 seconds under user1. :(

4

1 回答 1

1

相同的 SQL 语句(完全相同的文本)可以有不同的执行计划有多种原因。这可能是 Oracle 错误,也可能是“环境”的差异。例如占位符的不同数据类型、不同的 NLS_ 参数(排序、区分大小写)。

于 2013-03-04T12:04:39.777 回答