Hi All,
DELETE FROM customer_history
WHERE cust_type='SNB';
The "customer_history" table is having 255045688 records.
The table is having some indexes.
CREATE TABLE Customer_hstory (
Cust_ID NUMBER(3) NOT NULL,
Cust_Name VARCHAR2(30) NOT NULL,
cust_reg VARCHAR2(20) ,
City VARCHAR2(20) ,
cust_type CHAR(4) ,
Zip VARCHAR2(10),
reg_code VARCHAR2(12),
PRIMARY KEY (Cust_ID)
);
CREATE INDEX idx_cust_name ON Customer_hstory(cust_name);
CREATE INDEX idx_cust_type ON Customer_hstory(cust_type);
CREATE INDEX idx_reg_code ON Customer_hstory(reg_code);
As per my knowledge when we are performing DML operations on a table the index blocks has to update
so the DML operations slow down.
So before starting DELETE I have to drop all indexes on the table
and recreate once DELETE is completed?
Else I have to drop some spicified indexes?
Else no need to drop indexes?
While performing DELETE should we keep index (or) DELETE index for better performance?
Please help me.
Thanks.