INITRANS

 select * from v$event_name where name like 'enq: FB%';
 select NAME,PARAMETER1,PARAMETER2,PARAMETER3,WAIT_CLASS_ID,DISPLAY_NAME from v$event_name where name like 'enq: FB%';

 select TYPE,NAME,ID1_TAG,ID2_TAG,IS_USER,DESCRIPTION from v$lock_type where TYPE='FB';

 select session_id, sql_id, event, p1, p1text, p2 "TS#", p3 "Block", wait_time, session_state, time_waited from gv$active_session_history where event like '%FB%'
 
  and sql_id = '<insert_Stmt_SQL_ID_FROM_AWR>'; ------>>>> Replace SQL_ID
  
  
  
  2) If we have multiple sessions doing insert concurrently and more than one session are trying to format the block that may cause the contention.The value on P1 is name|mode , P2 tells the tablespace number, and P3 gives the dba.

SQL> select session_id,SQL_ID,EVENT,P1,P1text,P2,P3,WAIT_TIME,SESSION_STATE,TIME_WAITED from v$active_session_history where event like '%FB%';
SQL> select name from v$tablespace where ts#=P2; ----------->>> P2 value from above

SQL> SELECT dbms_utility.data_block_address_block(p3) "BLOCK", dbms_utility.data_block_address_file(p3) "FILE" from dual; ---->>> P3 Value from Above

-- and --


#1-- Also you can use below ::

SQL> select SID,USERNAME,SQL_ID from v$session where SQL_ID='&SQL_ID';

Enter SQL_IDs

#2-- SQL> select username, event, p1, p2 from v$session_wait where sid =&SID;

Now Enter all the SID separately / one by one for each SQL_ID from (#1).

#3-- SQL> select segment_name,segment_type from dba_extents where file_id = &file_id and &Block_id between block_id and block_id + blocks - 1;

FILE_ID=P1
BLOCK_ID=P2


SQL> alter table <TABLE> INITRANS 10 PCTFREE 40;
SQL> alter index <IND_NAME> rebuild partition <Partition_name> initrans 50 PCTFREE 40;
SQL> alter table <Schema.Table_name> modify default attributes tablespace <TS_NAME> initrans 10;
SQL> ALTER INDEX INDEX_NAME INITRANS 10 ;

3) Check for Below possible workarounds

* If there is any changes in Tablespace / Table level storage parameters recently
* If you have all the object and partitions in same tablespaces then move them to different tablespaces.
* Undersized storage parameters may cause the issue so please check and increase the value ( ex. PCTFREE and INITRANS etc )

SQL> alter table <TABLE> INITRANS 10 PCTFREE 40;
SQL> alter index <IND_NAME> rebuild partition <Partition_name> initrans 50 PCTFREE 40;
SQL> alter table <Schema.Table_name> modify default attributes tablespace <TS_NAME> initrans 10;
SQL> ALTER INDEX INDEX_NAME INITRANS 10 ;
* If you have large index block split then:

For segments with automatic ASSM, Oracle ignores attempts to change the PCT% setting. If you alter the PCT% setting or changed , then you must subsequently run the DBMS_REPAIR.SEGMENT_FIX_STATUS procedure to implement the new setting on blocks already allocated to the segment.

/* Below will Fix the bitmap status for all the blocks in table for that Schema */

SQL> exec dbms_repair.segment_fix_status('<Table_owner>','<Tab_Name>',dbms_repair.table_object);
-- and --

SQL> exec dbms_repair.segment_fix_status('<index_owner>','<index_name>',sys.dbms_repair.index_object);

SQL> exec dbms_repair.segment_fix_status('<index_owner>','<index_name>',dbms_repair.index_object);

Other possible workarounds:

* Auto allocate extent size or Pre allocate the extents to the segment having a high number of inserts.
* Make room for more extents on the Segments also check AWR and ADDM report for other possible Wait events which affects the IO of Database ( db file sequential read etc..)
* Look for any IO issue that is causing slowdown in formatting the blocks.
* Some time high IO operation like LARGE INDEX BLOCK SPLIT may require more extent allocation and may cause the enq: FB contention.
* Try to avoid multiple sessions doing the insert against one segment. Each session may try to format the block and can trigger the contention.
* It's better to put partition segments into different tablespace

相关推荐

  1. INITRANS

    2024-04-28 08:58:02       34 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-28 08:58:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-28 08:58:02       101 阅读
  3. 在Django里面运行非项目文件

    2024-04-28 08:58:02       82 阅读
  4. Python语言-面向对象

    2024-04-28 08:58:02       91 阅读

热门阅读

  1. js构造模式的解释和例子和优缺点

    2024-04-28 08:58:02       29 阅读
  2. PostgreSQL的扩展(extensions)-常用的扩展之PostGIS

    2024-04-28 08:58:02       36 阅读
  3. js动态设置css主题(Style-setProperty)

    2024-04-28 08:58:02       36 阅读
  4. js 延迟加载的⽅式有哪些

    2024-04-28 08:58:02       27 阅读
  5. 最短路(Dijkstra, Bellman-Ford, SPFA, Floyd)

    2024-04-28 08:58:02       25 阅读
  6. 数据结构与算法-图论-DFS/BFS

    2024-04-28 08:58:02       27 阅读
  7. 【笔记】 - Git

    2024-04-28 08:58:02       29 阅读
  8. isort库,一款超级神奇排序和格式化Python工具

    2024-04-28 08:58:02       33 阅读
  9. 解决eureka服务注册名报错

    2024-04-28 08:58:02       33 阅读
  10. 数字化转型之路:企业信息化建设的关键步骤

    2024-04-28 08:58:02       34 阅读
  11. HTML实体编码

    2024-04-28 08:58:02       35 阅读
  12. 多进程控制

    2024-04-28 08:58:02       32 阅读