我有一张桌子,上面有一个分区.
从SUBSCRIBER_01等开始有16个散列分区
表名:SUBSCRIBER
分区列:CUSTOMER_ID(VARCHAR2 10)
数据库:11g
如何找到记录的分区?
像Customer_ID = 933587
解决方法
选择行的rowid,DBMS_RowID.RowID_Object()过程将提取数据对象id.
http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_rowid.htm#i997153
在数据字典中查找该数据对象id并读取subobject_name.
例如:
SELECT dbms_rowid.rowid_object(ROWID) data_object_id FROM INVOICE WHERE INVOICE_ID = 2268041139: -- data_object_id = 546512 select * from user_objects where data_object_id = 546512; -- SUBOBJECT_NAME = 'PART_P2099_P00' -- OBJECT_TYPE = TABLE PARTITION -- OBJECT_ID = 464826 -- DATA_OBJECT_ID = 546512