![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
We keep running into suboptimal query plans with 11g and then we run into slow queries and once we collect stats, things get better again. How can we ensure our plans dont change as such ? Please advice. It is very frustrating and leads to downtime of our apps.. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
RF: # We keep running into suboptimal query plans with 11g and then we run into slow queries and once we collect stats, things get better again. How can we ensure our plans dont change as such ? ... Please advice. It is very frustrating and leads to downtime of our apps.. No silver bullets but a ton of very powerful techniques and potential useful solutions these days with 11g. You won't get very far though without investing the time and energy into coming up to speed technically with what is going on. Work on a short term strategy and long term strategy for how you are going to manage and maintain optimizer statistics! |
#5
| |||
| |||
|
|
We keep running into suboptimal query plans with 11g and then we run into slow queries and once we collect stats, things get better again. How can we ensure our plans dont change as such ? Please advice. It is very frustrating and leads to downtime of our apps.. |
#6
| |||
| |||
|
|
Is there any link to those options you provided below tied to locking plans ? I know of hints.. but the others are new to me. We do know that we have some massive data inserts at times and right now we dont have any procedures in place as far as when to collect stats.. we have tons of nightly jobs that run and is it best to collect stats after every job run ? |
|
"Mark D Powell" <Mark.Powe... (AT) hp (DOT) com> wrote in messagenews:8d1f0202-ac58-4091-9703-349a723ad569 (AT) fx12g2000vbb (DOT) googlegroups.com... On Jan 16, 4:10 pm, "RF" <r... (AT) hotmail (DOT) com> wrote: We keep running into suboptimal query plans with 11g and then we run into slow queries and once we collect stats, things get better again. How can we ensure our plans dont change as such ? Please advice. It is very frustrating and leads to downtime of our apps... You should look at the plans and compare the before and after statistics to see why the plan is changing. *If you have an index on a column which constantly have new values inserted on one end of a value range while having the other end of the value range deleted and histograms exist on the column the histograms can result in misleading information to Oracle since the histograms can quickly become out of date. To lock a plan in depending on Oracle version (11g in your case) and purchased options you can use hints, Outlines, SQL Profiles, or Adaptive Cursor Sharing to deal with the statements in question. *When you have access to the SQL I like hints since their presence in the code is visible to future developers/DBA's to see. HTH -- Mark D Powell -- |
#7
| |||
| |||
|
|
Is there any link to those options you provided below tied to locking plans ? I know of hints.. but the others are new to me. We do know that we have some massive data inserts at times and right now we dont have any procedures in place as far as when to collect stats.. we have tons of nightly jobs that run and is it best to collect stats after every job run ? "Mark D Powell" <Mark.Powe... (AT) hp (DOT) com> wrote in messagenews:8d1f0202-ac58-4091-9703-349a723ad569 (AT) fx12g2000vbb (DOT) googlegroups.com... On Jan 16, 4:10 pm, "RF" <r... (AT) hotmail (DOT) com> wrote: We keep running into suboptimal query plans with 11g and then we run into slow queries and once we collect stats, things get better again. How can we ensure our plans dont change as such ? Please advice. It is very frustrating and leads to downtime of our apps... You should look at the plans and compare the before and after statistics to see why the plan is changing. *If you have an index on a column which constantly have new values inserted on one end of a value range while having the other end of the value range deleted and histograms exist on the column the histograms can result in misleading information to Oracle since the histograms can quickly become out of date. To lock a plan in depending on Oracle version (11g in your case) and purchased options you can use hints, Outlines, SQL Profiles, or Adaptive Cursor Sharing to deal with the statements in question. *When you have access to the SQL I like hints since their presence in the code is visible to future developers/DBA's to see. HTH -- Mark D Powell -- |
![]() |
| Thread Tools | |
| Display Modes | |
| |