Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Poor performance after enabling db links
Answers
-
Thanks rp0428. As far as I know, it should be performing the same task (though, the ETL looks for changes to the source data, and therefore could have some variability in some areas). But, when I look at the inserts, on the warehouse-side, they look inline ... right around 234K. I can see the same for the day before and the day after.
I'll see if I can dig up some of the last few executions and we can compare the rows.
Regards,
Charles
-
You could have a situation where having more data pokes at the optimizer to use a better plan. You probably need to use some kind of plan stability, taking into account the variance of input. It's possible that removing hints allows the optimizer to properly use statistics it already knows about, but it's also possible you are setting up for a future "why did this become slow again?"You probably want to google up on adaptive cursor sharing and histograms too.
Understood, thanks.
I will research adaptive cursor sharing. I know that we have cursor_sharing set to 'EXACT' - this was per an OBIA performance note (not sure if that is relevant to what you are saying here ...).
Regards,
Charles
-
Charles M wrote:You could have a situation where having more data pokes at the optimizer to use a better plan. You probably need to use some kind of plan stability, taking into account the variance of input. It's possible that removing hints allows the optimizer to properly use statistics it already knows about, but it's also possible you are setting up for a future "why did this become slow again?"You probably want to google up on adaptive cursor sharing and histograms too.Understood, thanks.I will research adaptive cursor sharing. I know that we have cursor_sharing set to 'EXACT' - this was per an OBIA performance note (not sure if that is relevant to what you are saying here ...).Regards,Charles
ACS is not relevant here. ACS is all about when your bind variables can have hugely different selectivity depending on what you're passing in... you're not using bind variables here.
Cursor_sharing exact is good, some naughty applications will shove literals into their SQLs, causing you to do hard parses constantly, this just doesn't scale in OLTP and so the recommendation is to set cursor_sharing to force so that Oracle will take care of it for you. Since this is not an OLTP scenario, and you wouldn't expect to run the same process for a good few hours after running it, the time to parse it is going to be unimportant, so you're fine with the literals.
ACS is definitely an interesting read though.
As I said before, the presence of the DB link meant that your hints changed their meaning (they were invalid before), this had the unexpected result of making your nested loops hint target your views rather than the tables underneath the views. As you saw, removing the hint allowed the CBO to do what it wanted to do, and I suspect removing any others would be a good idea. Of course, if the CBO doesn't come up with the right plan on it's own, we can investigate why.
-
Thanks Andrew. I'm going to mark this as correct, as it sums up the primary focus of the discussion. It sounds like there is some more things I can review and possible implement, but we did address the main issue of the posting.
Again, thanks to everyone ... we covered a lot of ground on this, and there were many helpful ideas and great links provided along the way!
Regards,
Charles