Monitor the running status of Aix and database management systems on small machines until performance is optimized (SQL statement optimization and hardware troubleshooting)

Source: Internet
Author: User

Commands under Aix

1) topas checks the operating status of the Operating System

2) nmon (c -- CPU, m -- Memory, d -- Disk) checks the three conditions

Commands in Oracle

Tip: The following views monitor the database status on the production machine in real time. The query results change with the database system status at all times.

(1)

Selectopname, target, start_time, last_update_time, SQL _hash_value from V $ session_longopsorder by start_time DESC

Select * from V $ sqltext wherehash _value = 529107050 order by piece

The preceding two statements are used to monitor which statements in the system scan the entire table, and then find the specific SQL statements in the hash_value to the 2nd view.

Note that the two operations to scan the entire table must be fast; otherwise, the 2nd sentences cannot be found, because the cache will be cleared quickly, so when the database system is busy, use these two sentences for monitoring, because the cache will not be cleared so quickly.

 

 

 

Select status from V $ session

Check the number of connections in the database connection pool used by the client. "active" indicates the connected connection (Session), and "inactive" indicates the connection (Session) that is not used in the connection pool ), if the connection pool reaches the maximum number of connections and all connections are occupied, the system will query the database and wait in queue for the release of the new idle connection in the connection pool.

(2)

Select substr (B. SQL _text, 100), count (*) from V $ sqlarea B having count (*)> group by substr (B. SQL _text,) orderby 2 DESC

It is used to query in real time which SQL statements of the same SQL statement being executed by the database system on the production machine exceed 80 characters and more than 100 SQL statements are being executed.

 

 

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.