当前位置:网站首页>Oracle segment advisor, how to deal with row link row migration, reduce high water level
Oracle segment advisor, how to deal with row link row migration, reduce high water level
2022-07-02 07:12:00 【Virtuous time】
Oracle Yes 3 A background program that runs regularly , Consultant Duan suggested 、SQL Statement diagnosis 、 collect Statistics , The recommendation of the consultant is to analyze whether the distribution of table data in the data block is reasonable , Such as whether to generate row links 、 Line migration 、 Whether the high water level is reasonable .
Check whether consultant Duan suggests enabling
SELECT client_name ,status ,consumer_group
FROM dba_autotask_client
ORDER BY client_name;
see auto space advisor The status of this line
Enable the section consultant's suggestion
-- Enable
BEGIN
DBMS_AUTO_TASK_ADMIN.ENABLE(
client_name => 'sql tuning advisor',
operation => NULL,
window_name => NULL);
END;
/
-- see
SELECT window_name,TO_CHAR(window_next_time,'YYYY-MM-DD HH24:MI:SS')
,sql_tune_advisor
FROM dba_autotask_window_clients;
Check the content suggested by the consultant
SELECT
'Segment Advice --------------------------'|| chr(10) ||
'TABLESPACE_NAME : ' || tablespace_name || chr(10) ||
'SEGMENT_OWNER : ' || segment_owner || chr(10) ||
'SEGMENT_NAME : ' || segment_name || chr(10) ||
'ALLOCATED_SPACE : ' || allocated_space || chr(10) ||
'RECLAIMABLE_SPACE: ' || reclaimable_space || chr(10) ||
'RECOMMENDATIONS : ' || recommendations || chr(10) ||
'SOLUTION 1 : ' || c1 || chr(10) ||
'SOLUTION 2 : ' || c2 || chr(10) ||
'SOLUTION 3 : ' || c3 Advice
FROM
TABLE(dbms_space.asa_recommendations('FALSE', 'FALSE', 'FALSE'));
select
'Task Name : ' || f.task_name || chr(10) ||
'Start Run Time : ' || TO_CHAR(execution_start, 'dd-mon-yy hh24:mi') || chr (10) ||
'Segment Name : ' || o.attr2 || chr(10) ||
'Segment Type : ' || o.type || chr(10) ||
'Partition Name : ' || o.attr3 || chr(10) ||
'Message : ' || f.message || chr(10) ||
'More Info : ' || f.more_info || chr(10) ||
'------------------------------------------------------' Advice
FROM dba_advisor_findings f
,dba_advisor_objects o
,dba_advisor_executions e
WHERE o.task_id = f.task_id
AND o.object_id = f.object_id
AND f.task_id = e.task_id
AND e. execution_start > sysdate - 1
AND e.advisor_name = 'Segment Advisor'
ORDER BY f.task_name;
What is a line link
Row linking is due to its large amount of data ( Initial or later updated ), As a result, a row of data needs to span multiple data blocks , This is the line link .
What is row migration
A row data block is smaller initially or after being updated , It will be put into other data blocks with space , Only one pointer is reserved in the original data block , Point to the data block where the data is stored , This is row migration .
What are the disadvantages of row linking and row migration
When reading data, redundant I/O.
How to handle row linking and row migration
1. Move
- Move table alter table xxx move;
- Rebuild all indexes of the table
it is to be noted that , During this period, this table cannot have transactions .
2. Data migration
- Run an analysis script to analyze the linked data
- Insert the data generated by row linking and row migration into the temporary table
- Delete the data of row link and row migration generated by the original table
- Insert the data of the temporary table into the original table
3. Use the data pump to import and export the reconstruction table
What is high water level
High water level is the dividing line between unused data blocks and used data blocks , When querying data, start from the high water mark and look down .
How to lower the high water level
Yes 4 Medium method :
1. Contractile table
- Enable row migration alter table emp enable row movement
- Execute shrink alter table emp shrink space;
- Rebuild index
2.truncate surface
3. Move table ( Need to re index )
4. Use the data pump to export the table , Delete table , Re import
边栏推荐
- SSM二手交易网站
- ssm+mysql实现进销存系统
- Data warehouse model fact table model design
- Sqli-labs customs clearance (less15-less17)
- Oracle EBS interface development - quick generation of JSON format data
- ORACLE EBS ADI 开发步骤
- Oracle apex 21.2 installation and one click deployment
- [Zhang San learns C language] - deeply understand data storage
- Sqli labs customs clearance summary-page1
- The boss said: whoever wants to use double to define the amount of goods, just pack up and go
猜你喜欢

2021-07-05C#/CAD二次开发创建圆弧(4)

Cve-2015-1635 (ms15-034) Remote Code Execution Vulnerability recurrence

Proteus -- RS-232 dual computer communication

外币记账及重估总账余额表变化(下)

CVE-2015-1635(MS15-034 )远程代码执行漏洞复现

Cve - 2015 - 1635 (ms15 - 034) réplication de la vulnérabilité d'exécution de code à distance

In depth study of JVM bottom layer (3): garbage collector and memory allocation strategy

Queue (linear structure)

Spark的原理解析

CVE-2015-1635(MS15-034 )遠程代碼執行漏洞複現
随机推荐
Anti shake and throttling of JS
sqli-labs通关汇总-page4
php中生成随机的6位邀请码
图解Kubernetes中的etcd的访问
MySQL index
[daily question] - Huawei machine test 01
SQLI-LABS通关(less1)
Oracle rman半自动恢复脚本-restore阶段
2021-07-17c /cad secondary development creation circle (5)
SQLI-LABS通關(less6-less14)
Analysis of MapReduce and yarn principles
Basic knowledge of software testing
Underlying mechanism mvcc
JS judge whether the object is empty
Cloud picture says | distributed transaction management DTM: the little helper behind "buy buy buy"
Only the background of famous universities and factories can programmers have a way out? Netizen: two, big factory background is OK
ORACLE EBS ADI 开发步骤
mapreduce概念和案例(尚硅谷学习笔记)
CVE-2015-1635(MS15-034 )远程代码执行漏洞复现
Explain in detail the process of realizing Chinese text classification by CNN