Home Database Mysql Tutorial X$BH中各字段意义

X$BH中各字段意义

Jun 07, 2016 pm 03:22 PM
buffer head sys Field significance Inquire user

X$BH SYS用户可查询 buffer header数据,可以从数据库的数据字典表中查询得到,这张字典表就是x$bh,其中的bh就是指buffer headers,每个buffer在x$bh中都存在一条记录. buffer header中存储每个buffer容纳的数据块的文件号,块地址,状态等重要信息,根据这些信息,

X$BH SYS用户可查询
buffer header数据,可以从数据库的数据字典表中查询得到,这张字典表就是x$bh,其中的bh就是指buffer headers,每个buffer在x$bh中都存在一条记录.
buffer header中存储每个buffer容纳的数据块的文件号,块地址,状态等重要信息,根据这些信息,结合dba_extents视图,可以很容易地找到每个buffer对应的对象信息:
x$bh中还有一个重要的字段TCH,TCH为Touch的缩写,表示一个Buffer的访问次数,buffer被访问的次数越多,说明该buffer就越抢手,也就可能存在热块竞争的问题
可以结合DUMP BH来对比X$BH中字段,详见:http://blog.csdn.net/haibusuanyun/article/details/17525523
SYS@ bys3>desc x$bh ----总共57个字段:数据库版本:11.2.0.4
Name Type
-----------------------------
ADDR RAW(4) --Hex address of the Buffer Header.视图中某行的地址-缓冲区头的十六进制地址
INDX NUMBER --Buffer Header number
INST_ID NUMBER
HLADDR RAW(4) --即hash chain latch address可以和v$latch_children.addr关联,把latch和数据块关联起来
BLSIZ NUMBER --块大小
NXT_HASH RAW(4) --下一个BH的HASH值
PRV_HASH RAW(4) --前一个BH的HASH值
NXT_REPL RAW(4) --下一个BH的在LRU链上HASH值
PRV_REPL RAW(4) --前一个BH的在LRU链上HASH值
FLAG NUMBER ---块的状态,在BH中可能是buffer_dirty block_written_once redo_since_read ,详见最后
FLAG2 NUMBER
LOBID NUMBER
RFLAG NUMBER
SFLAG NUMBER
LRU_FLAG NUMBER --- LRU_FLAG,详见最后
TS# NUMBER --tablespace number表空间号
FILE# NUMBER --块在数据库内绝对文件号
DBARFIL NUMBER --块的相对文件号
DBABLK NUMBER --块号--在数据文件上的
CLASS NUMBER --太长,见最下面。
STATE NUMBER --太长,见最下面。
MODE_HELD NUMBER --
CHANGES NUMBER
CSTATE NUMBER
LE_ADDR RAW(4) --Lock Element address (OPS)
DIRTY_QUEUE NUMBER --LRUW上的buffer
SET_DS RAW(4) -- Buffer cache set this buffer is under
OBJ NUMBER --对象号
BA RAW(4) --BUFFER ADDRESS--在内存中的地址
CR_SCN_BAS NUMBER --Consistent Read SCN base 一致读SCN低位
CR_SCN_WRP NUMBER --Consistent Read SCN wrap 一致读SCN高位
CR_XID_USN NUMBER -- CR XID Undo segment no
CR_XID_SLT NUMBER -- CR XID slot
CR_XID_SQN NUMBER --CR XID Sequence
CR_UBA_FIL NUMBER -- CR UBA file
CR_UBA_BLK NUMBER -- CR UBA Block
CR_UBA_SEQ NUMBER --CR UBA sequence
CR_UBA_REC NUMBER --CR UBA record
CR_SFL NUMBER --
CR_CLS_BAS NUMBER
CR_CLS_WRP NUMBER
LRBA_SEQ NUMBER --Lowest RBA needed to recover block in cache
LRBA_BNO NUMBER
HSCN_BAS NUMBER ---SCN的低位
HSCN_WRP NUMBER --SCN的高位
HSUB_SCN NUMBER
US_NXT RAW(4)
US_PRV RAW(4)
WA_NXT RAW(4)
WA_PRV RAW(4)
OQ_NXT RAW(4) --- 对象队列前一个HASH值
OQ_PRV RAW(4) --- 对象队列后一个HASH值
AQ_NXT RAW(4) ---辅助对象队列前一个HASH值
AQ_PRV RAW(4) ---辅助对象队列后一个HASH值
OBJ_FLAG NUMBER
TCH NUMBER --Touch的缩写,表示一个Buffer的访问次数
TIM NUMBER --Touch Time
CR_RFCNT NUMBER
SHR_RFCNT NUMBER
###########################################
附:

flag中,每位代表如下含义:

bit bit
0 buffer_dirty 14 stale
1 notify_after_change 15 deferred_ping
2 mod_started 16 direct_access
3 block_has_been_logged 17 hash_chain_dump
4 temp_data 18 ignore_redo
5 being_written 19 only_sequential_access
6 waiting_for_write 20 prefetched_block
7 multiple_waiters 21 block_written_once
8 recovery_reading 22 logically_flushed
9 unlink_from_lock 23 resilvered_already
10 down_grade_lock 25 redo_since_read
11 clone_being_written 29 plugged_from_foreign_db
12 reading_as_CR 30 flush_after_writing
13 gotten_in_current_mode
class:表示buffer header对应block的类型:
1=data block, 9=2nd level bmb,
2=sort block, 10=3rd level bmb,
3=save undo block, 11=bitmap block,
4=segment header, 12=bitmap index block,
5=save undo header, 13=unused,
6=free list, 14=undo header,
7=extent map, 15=undo block
state:
0, FREE, no valid block image
1, XCUR, a current mode block, exclusive to this instance 正在被当前的instance独占。
2, SCUR, a current mode block, shared with other instances正在被当前的instance共享
3, CR, a consistent read (stale) block image 一致读
4, READ, buffer is reserved for a block being read from disk 正在从磁盘上读取块
5, MREC, a block in media recovery mode 处于介质恢复模式
6, IREC, a block in instance (crash) recovery mode处于实例恢复模式
lru_flag
0,'free',1,'xcur',2,'scur',
3,'cr', 4,'read',5,'mrec',
6,'irec',7,'write',8,'pi', 9,'memory'
10,'mwrite',11,'donated', 12,'protected',
13,'securefile', 14,'siop',15,'recckpt',
16, 'flashfree', 17, 'flashcur', 18, 'flashna'
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use Xiaohongshu account to find users? Can I find my mobile phone number? How to use Xiaohongshu account to find users? Can I find my mobile phone number? Mar 22, 2024 am 08:40 AM

With the rapid development of social media, Xiaohongshu has become one of the most popular social platforms. Users can create a Xiaohongshu account to show their personal identity and communicate and interact with other users. If you need to find a user’s Xiaohongshu number, you can follow these simple steps. 1. How to use Xiaohongshu account to find users? 1. Open the Xiaohongshu APP, click the "Discover" button in the lower right corner, and then select the "Notes" option. 2. In the note list, find the note posted by the user you want to find. Click to enter the note details page. 3. On the note details page, click the "Follow" button below the user's avatar to enter the user's personal homepage. 4. In the upper right corner of the user's personal homepage, click the three-dot button and select "Personal Information"

Log in to Ubuntu as superuser Log in to Ubuntu as superuser Mar 20, 2024 am 10:55 AM

In Ubuntu systems, the root user is usually disabled. To activate the root user, you can use the passwd command to set a password and then use the su- command to log in as root. The root user is a user with unrestricted system administrative rights. He has permissions to access and modify files, user management, software installation and removal, and system configuration changes. There are obvious differences between the root user and ordinary users. The root user has the highest authority and broader control rights in the system. The root user can execute important system commands and edit system files, which ordinary users cannot do. In this guide, I'll explore the Ubuntu root user, how to log in as root, and how it differs from a normal user. Notice

12306 How to check historical ticket purchase records How to check historical ticket purchase records 12306 How to check historical ticket purchase records How to check historical ticket purchase records Mar 28, 2024 pm 03:11 PM

Download the latest version of 12306 ticket booking app. It is a travel ticket purchasing software that everyone is very satisfied with. It is very convenient to go wherever you want. There are many ticket sources provided in the software. You only need to pass real-name authentication to purchase tickets online. All users You can easily buy travel tickets and air tickets and enjoy different discounts. You can also start booking reservations in advance to grab tickets. You can book hotels or special car transfers. With it, you can go where you want to go and buy tickets with one click. Traveling is simpler and more convenient, making everyone's travel experience more comfortable. Now the editor details it online Provides 12306 users with a way to view historical ticket purchase records. 1. Open Railway 12306, click My in the lower right corner, and click My Order 2. Click Paid on the order page. 3. On the paid page

How to check your academic qualifications on Xuexin.com How to check your academic qualifications on Xuexin.com Mar 28, 2024 pm 04:31 PM

How to check my academic qualifications on Xuexin.com? You can check your academic qualifications on Xuexin.com, but many users don’t know how to check their academic qualifications on Xuexin.com. Next, the editor brings you a graphic tutorial on how to check your academic qualifications on Xuexin.com. Interested users come and take a look! Xuexin.com usage tutorial: How to check your academic qualifications on Xuexin.com 1. Xuexin.com entrance: https://www.chsi.com.cn/ 2. Website query: Step 1: Click on the Xuexin.com address above to enter the homepage Click [Education Query]; Step 2: On the latest webpage, click [Query] as shown by the arrow in the figure below; Step 3: Then click [Login Academic Credit File] on the new page; Step 4: On the login page Enter the information and click [Login];

Thank you for the introduction to the meaning and origin of the bubble stalk. Thank you for the introduction to the meaning and origin of the bubble stalk. Mar 26, 2024 pm 06:36 PM

What’s the meaning of Thank You Bubble? Some friends are very interested in this meme, but don’t know what it means. Below I will introduce the meaning of the thank you bubble meme. Come and take a look. What is the meme of Thank You Bubble? This is actually an emoticon meme. It means that Bubble brings a glass of warm water. It hopes you will be healthy and not get sick. Say "Thank you Bubble" quickly. The meaning of the Thank You Bubble meme is that Bubble has brought something good, I hope you can say "Thank you Bubble". Thank you Bubble emoticon pack This is Bubble, it brings a glass of warm water, it hopes you will be healthy and not sick, please say "Thank you Bubble". This is Carl. Carl brought you a glass of water. Carl hopes that you must stay hydrated no matter what. Drink the glass of water and say: Thank you Carl for the water.

Analysis of user password storage mechanism in Linux system Analysis of user password storage mechanism in Linux system Mar 20, 2024 pm 04:27 PM

Analysis of user password storage mechanism in Linux system In Linux system, the storage of user password is one of the very important security mechanisms. This article will analyze the storage mechanism of user passwords in Linux systems, including the encrypted storage of passwords, the password verification process, and how to securely manage user passwords. At the same time, specific code examples will be used to demonstrate the actual operation process of password storage. 1. Encrypted storage of passwords In Linux systems, user passwords are not stored in the system in plain text, but are encrypted and stored. L

What other upgrades have there been to Cancun? What's the point of the Cancun upgrade? What other upgrades have there been to Cancun? What's the point of the Cancun upgrade? Apr 14, 2024 am 09:37 AM

Ethereum has continued to develop since its birth. The previously completed Cancun upgrade is a phased upgrade of Ethereum aimed at improving the scalability, security and sustainability of the Ethereum network. Although the Cancun upgrade is an important milestone for Ethereum 2.0, it does not mean that the upgrade work has been completed. The subsequent Ethereum 2.0 is still in the stage of development and improvement. Therefore, what upgrades will the currency circle expect after the upgrade of Cancun? Attracting much attention, official statements stated that after the Cancun upgrade is officially implemented in 2024, the Goerli test network will no longer be used, and there are no specific plans for subsequent upgrades. Next, the editor will tell you in detail. What other upgrades have there been to Cancun? There are no specific plans for other upgrades after the Cancun upgrade. In addition, according to the latest news, Ethereum Cancun upgrade 20

Comparison of similarities and differences between MySQL and PL/SQL Comparison of similarities and differences between MySQL and PL/SQL Mar 16, 2024 am 11:15 AM

MySQL and PL/SQL are two different database management systems, representing the characteristics of relational databases and procedural languages ​​respectively. This article will compare the similarities and differences between MySQL and PL/SQL, with specific code examples to illustrate. MySQL is a popular relational database management system that uses Structured Query Language (SQL) to manage and operate databases. PL/SQL is a procedural language unique to Oracle database and is used to write database objects such as stored procedures, triggers and functions. same

See all articles