Lakshminiarasu,
When you use the diagnostic help stats command, you may get more suggestions for statistics collections than you actually need. Unfortunately, it's difficult to know if the columns it is suggesting you collect on will make a difference to query plans or not. Especially if you already following the statistic collection guidelines that are provided here on Developer Exchange.
Often single column suggestions that show up in the output of the diagnostic command are more relevant than longer multi-column statistics. You can try collecting statistics on the recommended columns and see if you get better plans. If not, then don't collect them going forward.
I am not able to provide a response to your question about why you get merge or product joins in your explains. The optimizer apparently believes that is the best choice based on the available information. You could try to collect statistics more fully on the involved tables, if there are some recommended statistics that are not currently being collected
If you believe there is a something wrong happening when you nest views, like a deficiency in what the optimizer is doing, then please open an incident with the support center.
Thanks, -Carrie
Lakshminiarasu,
When you use the diagnostic help stats command, you may get more suggestions for statistics collections than you actually need. Unfortunately, it's difficult to know if the columns it is suggesting you collect on will make a difference to query plans or not. Especially if you already following the statistic collection guidelines that are provided here on Developer Exchange.
Often single column suggestions that show up in the output of the diagnostic command are more relevant than longer multi-column statistics. You can try collecting statistics on the recommended columns and see if you get better plans. If not, then don't collect them going forward.
I am not able to provide a response to your question about why you get merge or product joins in your explains. The optimizer apparently believes that is the best choice based on the available information. You could try to collect statistics more fully on the involved tables, if there are some recommended statistics that are not currently being collected
If you believe there is a something wrong happening when you nest views, like a deficiency in what the optimizer is doing, then please open an incident with the support center.
Thanks, -Carrie