Which factors can affect the performance of Oracle databases?

Source: Internet
Author: User

Oracle is being studied. There are many reasons for the impact on Oracle performance, which can be divided into four aspects:

1. hardware environment

CPU, memory, and network transmission conditions all affect Oracle performance.

The hardware example will not be explained here.

2. The configuration parameters during database running will also affect the performance of oracle.

The following describes the impact of configuration parameters in an example.

Currently, our project is used by a department of a company. After a period of normal operation, the operation is particularly slow (the current server has two CPUs ), by running CPU and memory in Linux, we find that 100% of CPU usage occurs during a period of time, while the utilization of another CPU is low, by balancing the load of the two CPUs, the program running speed returns to normal.

3. unreasonable table structure design will also affect Oracle Performance

The impact of unreasonable table structures on performance also occurs in another project. Currently, there is a table that stores the user's mobile phone number, during statistics, the user's mobile phone number needs to be classified for statistics, while the other table stores the region names that match the first four or the first seven digits of the mobile phone number, at this time, the programmer wrote an SQL statement: Select * From userphone, userarea where (left (userphone. phone, 4) = userarea. ID or left (userphone, 7) = userarea. ID); this statement does not affect the performance when there is a small amount of data in the userphone table in the early stage. However, when userphone reaches 10 thousand, the performance decreases rapidly. After analysis, it is determined that the table structure is not reasonable, so a userarea ID column is added to userphone, and the SQL statement is changed to select * From userphone, userarea where userphone. areaid = userarea. ID), the program running performance returns to normal.

4. For programmers, writing unreasonable SQL statements will also affect Oracle performance.

(1) If the programmer creates a database update transaction and does not commit the transaction, the system will be locked, which will seriously affect the system performance.

(2) In article 3rd, the programmer writes a statement similar to select * From userphone, userarea where (left (userphone. phone, 4) = userarea. ID or left (userphone, 7) = userarea. the statement is not familiar with the SQL running mechanism, but does not analyze the number of data records to be processed by the statement, so no unreasonable table structure is found, this causes a serious reduction in performance.

 

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.