The meaning of Oracle create index on (colname,0)

Source: Internet
Author: User

See an index today, create INDEX index_name tableanme (colname,0), very strange, never seen before. After testing the discovery is a thing relative to the joint index, there is no meaning, is built wrong.

Sql> select * from V$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
PL/SQL Release 11.2.0.1.0-production
CORE 11.2.0.1.0 Production
TNS for Linux:version 11.2.0.1.0-production
Nlsrtl Version 11.2.0.1.0-production
drop table test;
CREATE TABLE Test as SELECT * from Dba_objects;
Sql> Select COUNT (1) from Test t where t.object_id = 20;
COUNT (1)
----------
1
Sql> Select object_id from dba_objects s where s.object_name= ' ind_t_object_id ';
object_id
----------
107156
Sql> alter session SET events ' immediate trace name treedump level 107156 ';
Trace files found in the Trace directory of Oracle
-----Begin Tree Dump
BRANCH:0X20FDDC3 34594243 (0:nrow:104, level:1)
LEAF:0X20FDDC4 34594244 ( -1:nrow:814 rrow:814)
LEAF:0X20FDDC5 34594245 (0:nrow:808 rrow:808)
Leaf:0x20fddc6 34594246 (1:nrow:808 rrow:808)
Leaf:0x20fddc7 34594247 (2:nrow:808 rrow:808)
leaf:0x248381c 38287388 (3:nrow:808 rrow:808)
leaf:0x248381d 38287389 (4:nrow:808 rrow:808)
LEAF:0X248381E 38287390 (5:nrow:808 rrow:808)
leaf:0x248381f 38287391 (6:nrow:808 rrow:808)
..................................................
..................................................
leaf:0x2483832 38287410 (42:nrow:766 rrow:766)
leaf:0x2483833 38287411 (43:nrow:766 rrow:766)
LEAF:0X20FDDDD 34594269 (45:nrow:766 rrow:766)
..................................................
..................................................

Sql> Select Dbms_utility.data_block_address_file (34594269) "File",
Dbms_utility.data_block_address_block (34594269) "Block"
from dual;
File Block
---------- ----------
8 1039837

sql> alter system dump DATAFILE 8 block 1039837;
Find trace files in the Trace directory of Oracle, C1 15 is 20, how to convert please see http://blog.csdn.net/stevendbaguo/article/details/8010105. Col0 is Object_id,col1 is 20,col2 is rowid.
ROW#0[16207] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3e 62
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 4a
ROW#1[16190] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3e 63
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 4b
ROW#2[16173] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3e 64
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 4c
ROW#3[16157] Flag:------, lock:0, len=16
Col 0; Len 3; (3): C3 3f
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 4d
ROW#4[16140] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 02
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 4e
ROW#5[16123] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 03
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 4f
ROW#6[16106] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 04
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 50
ROW#7[16089] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 05
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 51
ROW#8[16072] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 06
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 52
ROW#9[16055] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 07
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 53
ROW#10[16038] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 08
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 54
ROW#11[16021] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 09
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 55
ROW#12[16004] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 0a
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 56
ROW#13[15987] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 0b
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 57
ROW#14[15970] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 0c
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 58
ROW#15[15953] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 0d
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 59
ROW#16[15936] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 0e
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 5a
ROW#17[15919] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 0f
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 5b
ROW#18[15902] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 10
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 5c
ROW#19[15885] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 11
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 5d
ROW#20[15868] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 12
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 5e
ROW#21[15851] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 13
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 5f
ROW#22[15834] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 14
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 60
ROW#23[15817] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 15
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 61
ROW#24[15800] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 16
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 62
ROW#25[15783] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 17
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 63
ROW#26[15766] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 18
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 64
ROW#27[15749] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 19
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 65
ROW#28[15732] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 1a
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 66
ROW#29[15715] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 1b
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 67
ROW#30[15698] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 1c
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 68
ROW#31[15681] Flag:------, lock:0, len=17
Col 0; Len 4; (4): C3 3f 1d
Col 1; Len 2; (2): C1 15
Col 2; Len 6; (6): 2e C1 00 69

The meaning of Oracle create index on (colname,0)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.