ORA-01450 maximum key length exceededCause The combined length of all the columns specified in a CREATE INDEX statement exceeded the maximum index length. The maximum index length varies by operating system. The total index length is computed as the sum of the width of all indexed columns plus the number of indexed columns. Date fields have a length of 7, character fields have their defined length, and numeric fields have a length of 22. Numeric length = (precision/2) + 1. If negative, add +1.
Action Select columns to be indexed so the total index length does not exceed the maximum index length for the operating system. See also your operating system-specific Oracle documentation.Copyright (C) 1998, Oracle Corporation
也就是说把索引列的长度太长了,改短点.
Action Select columns to be indexed so the total index length does not exceed the maximum index length for the operating system. See also your operating system-specific Oracle documentation.Copyright (C) 1998, Oracle Corporation
也就是说把索引列的长度太长了,改短点.
create index ix_test3_ab on test3(a,b)
*
ERROR 位于第 1 行:
ORA-01450: 超出最大的关键字长度 (6398)SQL> DROP TABLE TEST3 CASCADE CONSTRAINTS表已丢弃。SQL> create table test3(a varchar2(400), b varchar2(400));表已创建。SQL> create index ix_test3_ab on test3(a,b);索引已创建。看出来了吧?你的两个字段建立的复合索引,单个索引项最大可能是4000+4000共计8000个字节,有可能超过6398这个限制,因此索引无法创建。如果你没有那么多内容要存储的话,就把字段定义小点。
DB_BLOCK_SIZE
index 的 PCT_FREE、INITRANS
等等参数。也就是说,这个值对于不同的平台、不同的用户设置,会不同。