Use of Oracle Table statistics

Source: Internet
Author: User

Recently developed the process of processing ECIF related projects, using Stored procedures to run batch processing data. Run batches of data regularly, each time the stored procedure runs using temporary tables for data collation, and then join this temporary table to put the data into the target table, and finally empty the temporary table.

Issue: Execution is slow in join processing, sometimes not a result set for half a day.

Resolution: Update database table statistics + Use multi-Process Execution

Many processes do not speak much here. Each time the data is inserted into the temporary table, the data reaches millions of, and the table is cleared after the stored procedure, which causes the database to mistakenly assume that the temporary table data is 0 consistent because the database table statistics are not real-time. Updating table statistics is a good way to estimate statistics (especially for larger partitioned tables) and to get better statistical results, resulting in a faster SQL execution plan.

is to have the database update the staging table statistics before the join operation is processed.

Dbms_stats.gather_table_stats (ownname=> ' Your user name ',tabname=> ' Your table name ', degree=>8,cascade=>true);


For more information about Oracle statistics, see: Collecting Oracle Statistics



Use of Oracle Table statistics

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.