How to use Explain Plan to optimize queries?

前端 未结 4 495
甜味超标
甜味超标 2020-12-24 02:38

I have been tasked to optimize some sql queries at work. Everything I have found points to using Explain Plan to identify problem areas. The problem I can not find out exact

4条回答
  •  猫巷女王i
    2020-12-24 03:44

    You got the fuzzy end of the lollipop.

    There is absolutely no way, in isolation, without a ton of additional information and experience, to look at an explain plan and determine what (if anything) is causing less than optimum performance. If query tuning could be reduced to a 10 step process it would be done by an automated process. I was about to list all of the things you need to understand to be effective at this but that would be a very long list.

    the only short answer I can think of... is look for steps in the plan that are going through way more bytes than you'd guess. Then think about how you can reduce that number... via an index or partitioning.

    Seriously, get Jonathan's Lewis book on Cost Based Oracle Fundementals

    Get Tom Kyte's book on Oracle database Architecture and rent a cabin in the woods for a few weeks.

提交回复
热议问题