SQL Optimization Technical Analysis-4: Other

Source: Internet
Author: User
Tags table definition
Oracle's hints feature is a relatively strong feature and is a complex application, and hints are only a recommendation to Oracle, and sometimes Oracle may not follow the prompts for cost considerations. According to practical application, the developer is generally not recommended to apply the Oracle hint, because the performance of the database and server is not the same, it is possible to improve performance in one place, but the other is down, Oracle in the SQL to perform the analysis is more mature, If the parse execution path is not the first should be analyzed in the database structure (mainly index), the server's current performance (shared memory, disk file fragmentation), database objects (tables, indexes) statistics are correct.    use cursors with caution. In some cases where cursors must be used, consider moving the qualifying rows of data into a temporary table and then manipulating the temporary table definition cursors, which can significantly improve performance.    number of database connection pools = number of thread pools: the average of each thread that needs to connect to the database is x1.1 (1.1 means increasing the peak load of 10%), and the average number of connections to the database per thread is 1, that is, when the number of threads is 120, the database connection pool is 132.     set the initial pool size = maximum pool size.    use as few format conversions as possible in a massive query.       obtain the required data from the database in large quantities, and avoid the application repeatedly callback the database.

SQL Optimization Technical Analysis-4: Other

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.