0

i'm struggeling with Performance in oracle. Situation is: Subsystem B has a dblink to master DB A. on System B a query completes after 15 seconds over dblink, db plan uses appropriate indexes.

If same query should fill a table in a stored procedure now, Oracle uses another plan with full scans. whatever i try (hints), i can't get rid of these full scans. that's horrible.

What can i do?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
user
  • 157
  • 2
  • 14

3 Answers3

0

The Oracle Query Optimizer tries 2000 different possibilities and chooses the best one in normal situations. But if you think it choose wrong plan, You may suspect the following cases:

1- Your histograms which belongs to querying tables are deprecated.

2- Your indexes can not be used because of your faulty query.

3- You can use index hints to force the indexes to be used.

4- You can use SQL Advisor or run TKProf for performance analysis and decide what's wrong or what caused bad performance. Check network, Disk I/O values etc.

If you share your query we can give you more information.

mehmet sahin
  • 802
  • 7
  • 21
0

Look like we are not taking same queries in two different conditions. First case is Simple select over dblink & Second case is "insert as select over dblink".

can you please share two queries & execution plans here as You may have them handy. If its not possible to past queries due to security limitations, please past execution plans.

-Abhi

0

after many tries, I could create a new DB Plan with Enterprise Manager. now it's running perfect.

user
  • 157
  • 2
  • 14