`
MicroJoey
  • 浏览: 87074 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

what is the difference between object_id and data_object_id?

 
阅读更多

The object_id is the primary key, the data_object_id is the foreign key to the data segment.

You can find the DDL operation against the object (for instance,
Truncate,Move etc.)by querying the dba_objects with object_id not equal to data_object_id.





引用


Hi Tom,

For some objects in dba_objects, I see object_id is not matching with data_object_id even
when that object is not part of the cluster.

21:35:49 SQL> select count(*) from dba_objects where
data_object_id is not null and
object_name not in (
select distinct table_name from dba_clu_columns)
/

  COUNT(*)
----------
      5930

Can you please explain why they are different and what could cause that.

Thanks.

and we said...

The object_id is the primary key, the data_object_id is the foreign key to the data
segment.

Initially they are "the same"

But any operation that radically changes the data segment - eg: truncate, alter table
exchange partition, etc -- will change the data_object_id -- the data segment the object
points to.


consider:

ops$tkyte@ORA9IR2> create table t ( x int );

Table created.

ops$tkyte@ORA9IR2>
ops$tkyte@ORA9IR2> select object_name, object_id, data_object_id
  2    from user_objects
  3   where object_name = 'T';

OBJECT_NAME                     OBJECT_ID DATA_OBJECT_ID
------------------------------ ---------- --------------
T                                   29413          29413

ops$tkyte@ORA9IR2>
ops$tkyte@ORA9IR2> truncate table t;

Table truncated.

ops$tkyte@ORA9IR2>
ops$tkyte@ORA9IR2> select object_name, object_id, data_object_id
  2    from user_objects
  3   where object_name = 'T';

OBJECT_NAME                     OBJECT_ID DATA_OBJECT_ID
------------------------------ ---------- --------------
T                                   29413          29414

ops$tkyte@ORA9IR2>
ops$tkyte@ORA9IR2> alter table t move;

Table altered.

ops$tkyte@ORA9IR2>
ops$tkyte@ORA9IR2> select object_name, object_id, data_object_id
  2    from user_objects
  3   where object_name = 'T';

OBJECT_NAME                     OBJECT_ID DATA_OBJECT_ID
------------------------------ ---------- --------------
T                                   29413          29415




Refer Weblink:
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:23417970272903
http://space.itpub.net/17203031/viewspace-690629
分享到:
评论

相关推荐

    java面试题英文版及其答案

    11. What is the difference between `System.out.println()` and `System.out.print()` in Java?Answer: Both methods are used for outputting text to the console, but they differ in how they display the ...

    微软内部资料-SQL性能优化3

    An isolation level determines the degree to which data is isolated for use by one process and guarded against interference from other processes. Prior to SQL Server 7.0, REPEATABLE READ and ...

    java英文笔试

    What is the major difference between Oracle 8i and Oracle 9i? **Answer**: The differences between Oracle 8i and Oracle 9i are detailed on the official Oracle website. However, some key distinctions ...

    华南理工大学计算机全英班算法设计实验

    4)And compare the results between these two algorithms and the difference of selection processes. 5)Write down the report in which there should be the execution results of the program. ...

    acpi控制笔记本风扇转速

    condition is known to exist between AcpiWalkNamespace and the Load/Unload ASL operators and is still under investigation. Restructured the AML ParseLoop function, breaking it into several ...

    微软内部资料-SQL性能优化5

    The order of pages in the page chain, and the order of rows on the data pages, is the order of the index key or keys. Deciding which key to cluster on is an important performance consideration. When ...

    微软内部资料-SQL性能优化2

    One of the most common uses of non-paged pool is the storage of object handles. For more information regarding “maximums,” see also… Inside Windows 2000,Third Edition, pp. 403-404 Paged Pool ...

    BobBuilder_app

    In the event of page getting full and reaching the PageItemCount, MGIndex will sort the keys in the page's dictionary and split the data in two pages ( similar to a b+tree split) and update the page ...

    计算机网络第六版答案

    Traffic between the Google data centers passes over its private network rather than over the public Internet. Many of these data centers are located in, or close to, lower tier ISPs. Therefore, when ...

    Java邮件开发Fundamentals of the JavaMail API

    A general familiarity with object-oriented programming concepts and the Java programming language is necessary. The Java language essentials tutorial can help. copyright 1996-2000 Magelang ...

    WizFlow网页编辑

    Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined ...

    hibernate-shards.jar

    Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    Correct use of header files can make a huge difference to the readability, size and performance of your code. The following rules will guide you through the various pitfalls of using header files. ...

    Smart Mobile Studio Enterprise v2.0 Build 723 Cracked

    The fundamental difference between Smart and other rapid application development (RAD) systems is that Smart does not rely on a server. You author the project just like you would do in Delphi or ...

    Dundas.Chart.for.Winform.Enterprise.v7.1.0.1812.for.VS2008

    The Rose Chart type is a circular chart that allows for great data comparison between data series. (Part of the Enterprise Edition). Chart Builder - The new Chart Builder lets developers and non- ...

    数位板压力测试

    The design presented here is based on the input of numerous professionals from the pointing device manufacturing and Windows soft¬ware development industries. In this document, the words "tablet" ...

    Universal-USB-Installer

    running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). ...

    生命周期建模语言 (LML) V1.1 英文版

    The LML specification’s purpose is to provide a reference for users of the language to understand its goals, concepts and structure and to provide vendors a reference for implementation of the ...

    CSharp 3.0 With the .NET Framework 3.5 Unleashed(english)

    - **A Quick Introduction to Reference Types and Value Types**: This section explains the fundamental difference between reference types (like objects and arrays) and value types (like integers and ...

    外文翻译 stus MVC

    However, there is a monumental difference between a grade school page and a professionally developed Web site. The page designer (or HTML developer) must understand colors, the customer, product flow...

Global site tag (gtag.js) - Google Analytics