Oracle-sql Program Optimization 4

Source: Internet
Author: User

A year of DBA work, experience is still shallow, but encountered problems can always be solved, today, I met a more wonderful problem.

Operation and maintenance personnel told me that after the afternoon ETL has been stuck did not continue, then I thought that is what compatibility problems caused by the re-run ETL, who knows again in the fifth step on the card, several times all this, the individual execution of the ETL node also executed a long time has not ended, nor error. Usually it takes 1 seconds to finish the job, and it took a lot of time to cancel it. Run at noon no problem ah, how can this. The following is the execution of the graph SQL:

Just started to check the table of high watermark, no exception, because the table into the data before the truncate, exclude.

Find table bad block, no exception, exclude.

Locks are also excluded.

View the SQL execution plan, because there is a remote table, the execution plan is not detailed, but you can be sure that the SELECT statement execution is not a problem, the SELECT statement executed 1 seconds.

View AWR Analysis Report

The database was restarted, and it didn't work.

Because it has not been carried out, see no problem, in addition to taking a long time.

Later on try to create a new table instead of Sap_mo_short, who knows the result is still the same, just built a new table ...

Immediately very silent, with this SQL to build a view quickly, but the table is very slow, and insert Sap_mo_short is the same, super long super slow, really more no language ....

Immediately ETL homework to run again, helpless under the job can only stop ...

To exclude the table problem, the study of the SELECT statement, but the execution quickly ah, noon also no problem, so the link to change the way

Actually executed in less than 1 seconds, the same amount of data ... A little skeptical of life ...

Oracle-sql Program Optimization 4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.