How do I troubleshoot performance problems with an Oracle SQL statement

前端 未结 9 1526
夕颜
夕颜 2021-02-10 08:12

I have two insert statements, almost exactly the same, which run in two different schemas on the same Oracle instance. What the insert statement looks like doesn\'t matter - I\'

相关标签:
9条回答
  • 2021-02-10 08:52

    The main culprits in insert slow downs are indexes, constraints, and oninsert triggers. Do a test without as many of these as you can remove and see if it's fast. Then introduce them back in and see which one is causing the problem.

    I have seen systems where they drop indexes before bulk inserts and rebuild at the end -- and it's faster.

    0 讨论(0)
  • 2021-02-10 08:52

    analyzing the oI also highly recommend the book Optimizing Oracle Performance, which discusses similar tools for tracing execution and utput.

    0 讨论(0)
  • 2021-02-10 08:57

    SQL Trace and tkprof are only good if you have access to theses tools. Most of the large companies that I do work for do not allow developers to access anything under the Oracle unix IDs.

    I believe you should be able to determine the problem by first understanding the question that is being asked and by reading the explain plans for each of the queries. Many times I find that the big difference is that there are some tables and indexes that have not been analyzed.

    0 讨论(0)
提交回复
热议问题