日期:2014-05-16  浏览次数:20420 次

Will the valid status of index impact dml operation?
DROP TABLE tab01;
SELECT * FROM tab01;

CREATE TABLE tab01
(ID NUMBER NOT NULL PRIMARY KEY,
NAME VARCHAR2(50)
);

SELECT index_name,a.status FROM User_Indexes a
WHERE index_name IN ('SYS_C0098887','IDX_NAME');

ALTER TABLE tab01 MOVE;

INSERT INTO tab01
SELECT object_id,object_name FROM user_objects
WHERE object_id IS NOT NULL;

INSERT INTO tab01
SELECT 1,'a' FROM dual;

INSERT INTO tab01
SELECT 2,'b' FROM dual;


ALTER INDEX SYS_C0098885 REBUILD;

CREATE INDEX idx_name ON tab01(name);

SELECT * FROM tab01;

UPDATE tab01
SET NAME='aaaa'
WHERE NAME ='SRC_PROV';








Conclusion:
1,if primary key related index will impact dml operations
2,others indexes do not impact the dml operations.