At first experience in Statspack

xiaoxiao2021-03-06  106

Oh, I have never done STATSPACK tonight (it seems a bit shameful.

). A database is really ignorant these days, clear SGA_MAX_SIZE has 1.5G, but actually reads 200 M memory, slowly to die, frequently read and write hard drives, the biased disk is not a disk array, IO madness ,, Pain. So I decided to take some time to learn instance optimization. Today, I printed a few pages of Performance Tuning Guide. I read the content of STATSPACK. I did experiment on my own notebook. It is still very easy.

First run% Oracle_Home% / RDBMS / Admin / SPCReate, specify the password, table space, and temporary table space of the Perfstat user, generally default. Then there is a bunch of successful tips. If you don't have time, it doesn't matter, you can go to your DOS window (I am Win32 platform) to see the .lis file, those that are installing the trace file.

Then you can use the Perfstat / password to log in to SQLPlus, execute: exec statspack.snap; is a Snapshot, you can make a schedule once every time you run once.

View the report:% Oracle_Home% / RDBMS / Admin / Spreport runs prompts all SNAPShot IDs that have been made, then select the start ID and end ID of this report as needed, and then enter the file name to get a .lst file ( The subfix name is written here .LIS, it should be wrong, but I see 9i documentation, run 10G database, I don't know if it is a version problem), you can use the text tool to open.

Check SQL: When viewing reports, you can see the tracking SQL, where there is Hash Value, record the Hash Value of the statement to be more detailed, run the% ORACLE_HOME% / RDBMS / Admin / SPREPSQL, you can get it as before The LST file records more detailed analysis of the SQL statement.

Do more Snapshot, you may need to delete some historical data, run Oracle_Home% / Rdbms / Admin / SPPurge, depending on the note to delete the ID, but all delete oracle_home% / rdbms / admin / sptrunc, all the way to the car can.

Finally, pay attention to the snapshot's level, which can be modified via EXEC STATSPACK.MODIFY_STATSPACK_PARAMETER (i_snap_level => n), and N can be 0, 5, 6, 7, 10, default 5.

0 only provides general performance statistics

5 Increase the overall analysis of SQL statements

6 Added SQL plan and use

7 Added statistics of segmentation (segments)

10 Added the analysis of latches

It is recommended to be cautious about 10, because the considerate is high.

Because it is just a system you play, it is not possible to analyze it, just practice the use of Statspack. The results of the results must learn to learn

I have found that Tom's two books have been introduced, but

Expert One-on-One Oracle is more detailed.

转载请注明原文地址:https://www.9cbs.com/read-99454.html

New Post(0)