Oracle 1. a statspack! when the system is functioning well and save the result file as a future judgment standard .2. Oracle builds a table script that holds execution plans as follows: --Create a schedule CREATE table Plan_hashes (sql_text varchar2 (1000), hash_ value number, plan_hash_value number, constraint plan_hashes_pk primary Key (Hash_value,sql_text,plan_hash_value)) Organization index; -- Insert the statement in Shared_pool into the schedule insert into Plan_hashes (Sql_text, Hash_value, plan_hash_value) SELECT DISTINCT sql_text, & nbsp; hash_value, Plan_hash_value from V$sql where Command_type in ( /* DELETE */7, * * INSERT/2, /* merge */189, /* SE Lect/3, /* UPDATE * * 6) and parsing_user_id <> 0 and parsing_schema_id <> 0;& nbsp;--View Current Shared pDifference between the execution plan and the schedule in Ool select DISTINCT sql_text, hash_value, plan_hash_value, decode (select 1 from plan_hashes WHERE plan_hashes.hash_value = v$ sql.hash_value and Plan_hashes.sql_text = v$sql.sql_text and rownum = 1), 1, ' Changed ', ' New ' Status from v$sql Where (Sql_text, Hash_value, Plan_hash_value) not in (select Sql_text, Hash_value, plan_hash_value from Plan_hashes) and Command_type in ( /* DELETE */7, /* INSERT/2, /* merge */189, /* SELECT/3, /* UPDATE * * * 6) &NB sp; and parsing_user_id <> 0 and parsing_schema_id <> 0/ --shared_ The new execution plan in pool is saved into the schedule insert into Plan_hashes (Sql_text, Hash_value, plan_hash_value) SELECT DISTINCT sql_text, & nbsp; hash_value, Plan_hash_value from v$sql Where (Sql_text, Hash_value, Plan_hash_value) not in (select Sql_text, Hash_value, plan_hash_value from Plan_hashes) and Command_type in ( /* DELETE */7, /* INSERT/2, /* merge */189, /* SELECT/3, /* UPDATE * * * 6) and P arsing_user_id <> 0 and parsing_schema_id <> 0/ 3. To find the difference and collect the previous history, we can find out the difference between the two by comparing to each other 4. only changeOne question not many people change multiple issues at the same time, do not change multiple issues by yourself, so you cannot determine exactly which changes solve the problem 5. Confirm that you need to modify the problem before you set the target, and verify (the small benchmark is necessary) before you start 6. Backups are required before any changes are made to enable the system to fall back to the state of the change 7. build small test cases because the system can be huge, it's very complex and time-consuming to run , so you need to peel as many unwanted code as you can, using simple, straightforward test cases to reproduce the error!
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