Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Delete performance
Hi,
I have a big problem with a delete query.
I try to delete all rows (100 000 rows ) from a table named ITEM. It takes
about 1 hour.
This table contains a lot of indexes (see the script after).
When i try to copy the table to a temporary table , and then when i delele
the temporary table,
the time for deleting the entire table is pretty good (about 3 minutes).
What happens with my ITEM table ?
Why does it take so long time for deleting ?
How can i improve my delete ?
Thanx for Your help.
My table structure is
create table ITEM
(
IT_ITEMCODE VARCHAR2(13) not null, IT_CODE VARCHAR2(3) not null, IT_INSERTTIME DATE not null, IT_RECORDTYPE NUMBER(2) not null, IT_CREATETIME DATE null , IT_ID VARCHAR2(8) null , IT_IDNUMBER NUMBER(3) null , IT_SHORT VARCHAR2(13) null , IT_HITSHORT VARCHAR2(8) null , IT_USERID VARCHAR2(8) null , IT_RECORDID NUMBER(10) null ,constraint PK_ITEM primary key (IT_ITEMCODE, IT_CODE, IT_INSERTTIME, IT_RECORDTYPE)
using index tablespace INDEX_1