When I trying delete a table, this sentence take a lot of time... please help me. - originally poste
Dear.
I am trying to erase records from table that has more than one million records, the delete takes a lot of time. Please can you help me optimize like this?
The table that I am trying delete record is the following:
-- Create table
create table DWH_VT_DETALLE_VENTA
(
ID_ENLACE VARCHAR2 (9) not null ,
ID_SUCURSAL VARCHAR2 (5) not null ,
ID_FACTURA VARCHAR2 (16) not null ,
ID_FECHA_VENTA DATE not null ,
ID_ESTADISTICO VARCHAR2 (9) not null ,
CHECK_ESTADISTICO VARCHAR2 (1),
CANTIDAD FLOAT ,
PRECIO_UNITARIO FLOAT ,
TOTAL_VENTA FLOAT ,
IVA FLOAT ,
BASE_IVA FLOAT ,
VALOR_DSCTO FLOAT ,
DSCTO_PAGADO FLOAT ,
ID_TIPO_TRANSACCION VARCHAR2 (2),
I am trying to erase records from table that has more than one million records, the delete takes a lot of time. Please can you help me optimize like this?
The table that I am trying delete record is the following:
-- Create table
create table DWH_VT_DETALLE_VENTA
(
ID_ENLACE VARCHAR2 (9) not null ,
ID_SUCURSAL VARCHAR2 (5) not null ,
ID_FACTURA VARCHAR2 (16) not null ,
ID_FECHA_VENTA DATE not null ,
ID_ESTADISTICO VARCHAR2 (9) not null ,
CHECK_ESTADISTICO VARCHAR2 (1),
CANTIDAD FLOAT ,
PRECIO_UNITARIO FLOAT ,
TOTAL_VENTA FLOAT ,
IVA FLOAT ,
BASE_IVA FLOAT ,
VALOR_DSCTO FLOAT ,
DSCTO_PAGADO FLOAT ,
ID_TIPO_TRANSACCION VARCHAR2 (2),
0