object_id 與data_object_id 的區別
對於,有幾個值得注意的地方
1, 與是有區別的,前者指dictionary object number;後者指dictionary object number of the segment
2, 對普通表及索引來說,object_id與data_object_id是一致的.當object不佔用儲存空間時, data_object_id為null,如分割槽表(不是指分割槽),view,sequence,synonym等等
3, 分割槽表中的分割槽有不同的object_id和data_object_id; 分割槽表無data_object_id
注意dba_objects.object_id與dba_objects.data_object_id的區別
OBJECT_ID :Dictionary object number of the object
DATA_OBJECT_ID :Dictionary object number of the segment that contains the object
NOTE: OBJECT_ID and DATA_OBJECT_ID display data dictionary metadata. Do not confuse these numbers with the unique 16-byte object identifier (object ID) that the oracle Database assigns to row objects in object tables in 0the system
[@more@]xxx_objects.data_object_id differs from object_id aftertruncate table (or alter table truncate partition), unless table/partition is empty
alter table move (or alter table move partition)
alter index rebuild (or alter index rebuild partition)
alter table exchange partition
Alter table move even without TABLESPACE clause (or specifying the same tablespace) physically moves the table, based on dba_extents.file_id and block_id. But truncate table doesn't move the table. Think of data_object_id as an ID for the segment. If xxx_objects.data_object_id is null, it must be an object not associated with a physical segment, such as view, sequence, domain index, partitioned table/index whose segments are in the individual partitions.
* How much does data_object_id increment?
Except in case of partition-table exchange, data_object_id is brought up to
select max(data_object_id)+1 from dba_objects
If you just create a new table, it will be assigned an object_id and data_object_id of
select greatest(max(object_id), max(data_object_id)) from dba_objects
If the table has an index, truncate will increment data_object_id by 2 because its index takes the number 1 below it. If there's no index, truncate should increment data_object_id by 1 only.
Exchange of a partition with a table swaps their data_object_id's. So don't assume data_object_id's always go up.
If the table or its partition is already empty, truncating it does not increment data_object_id. (Rebuilding an empty index or its partition still increments data_object_id.)
* When to use which ID?
You use data_object_id in dbms_rowid.rowid_object, v$bh and x$bh, but object_id in most other
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271283/viewspace-1018632/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- data_object_id 及 object_id 的聯絡與區別Object
- Oracle中object_id和data_object_id的區別OracleObject
- object_id and data_object_id 區別_20091213Object
- object_id與data_object_id的關係Object
- OBJECT_ID、DATA_OBJECT_ID與truncate的本質Object
- object_id與data_object_id淺析(一)Object
- object_id與data_object_id淺析(二)Object
- OBJECT_ID和DATA_OBJECT_IDObject
- Differences between DATA_OBJECT_ID and OBJECT_IDObject
- object_id 及 data_object_id (oracle)ObjectOracle
- object_id and data_object_id in dba_objectsObject
- ??與?:的區別
- MySQL的@與@@區別MySql
- mybatis #與$的區別MyBatis
- Null 與 “” 的區別Null
- &與&&, |與||區別
- in與exist , not in與not exist 的區別
- OBJECT_ID的重用Object
- CentOS 與 Ubuntu 的區別CentOSUbuntu
- artice與section的區別
- GET 與 POST 的區別
- WebSocket 與 Socket 的區別Web
- Postgresql與MySQL的區別MySql
- chown與chmod的區別
- LESS與SASS的區別
- free 與 CFRelease 的區別
- gulp與webpack的區別Web
- @Autowired 與@Resource的區別
- let與var的區別
- post與get的區別
- HashSet與HashMap的區別HashMap
- maven與ant的區別Maven
- __new()__ 與 __init()__的區別
- TCP與UDP的區別TCPUDP
- Mysql與mongodb的區別MySqlMongoDB
- typedef與define的區別
- Eureka與Zookeeper的區別
- buffer與cache的區別