Anubhab
Anubhab

Reputation: 1786

Does a oracle query performance depends on DB users?

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

Upvotes: 1

Views: 555

Answers (1)

ibre5041
ibre5041

Reputation: 5298

There are various reasons why same the SQL statement(exactly same text) can have different execution plans. This can be either an Oracle bug or a difference in the "environment". For example different datatypes for placeholders, different NLS_ parameters (sorting, case sensitivity).

Upvotes: 1

Related Questions