Meaning of Oracle create index on (colname, 0), oraclecolname

Source: Internet
Author: User

Meaning of Oracle create index on (colname, 0), oraclecolname

Today, I saw an index, create index index_name tableanme (colname, 0). It's strange that I have never seen it before. After tests, it was found that it was an item relative to the Union Index and it had no meaning, but it was an error.

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

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.