Database Tuning (MOSC)

MOSC Banner

Two users have the different exectuion plan for the same query

edited Feb 24, 2011 1:58PM in Database Tuning (MOSC) 12 commentsAnswered ✓
Hi All,

My DB sever is 11.1  RAC 4 nodes.

I did this test by connecting to one node explicitly (with its SID).

Two similar user U1 and U2 have the same privilges.

When they ran the sql below, parallel query was used for U1 and normal serial execution was used for U2 by CBO.

select *
from U1.table1,
       U1.table2,
       ...
where (JOINS)

What are possible reasons? I didn't change any parameter at session level.

Another problem is that I found CBO chose nested loops as join method for all tables in this query. It returned data within 30s. But if I used use_hash hint for every table, execution plan showed that it would use hash joins and the query completed within 5s.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center