Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: delete from table
I altered the indices, but it does not seem to help. The sql statement is:
delete from table_t where field_a between 140000 and 140100 and field_b=0
where field_a is the PK and field_b has no index on it.
select * from table_t where field_a between 140000 and 140100 and field_b=0
works fine.
thanks
cc
The corresponding select
<dellera_at_my-deja.com> schrieb im Newsbeitrag
news:8tgu0q$8p2$1_at_nnrp1.deja.com...
>
> > I have a problem when deleting from a table with
> > about 100,000 rows and 20 columns.
> > Usually between 4 and 5 records are deleted at a time,
> > the field in the where clause is a primary key.
> > Sometimes, and it seems to happen more often every day,
> > the statement takes more than a minute.
> > Any ideas?
>
> I suppose you have already tried this, but
> have you rebuilt the index ? If you insert/delete
> frequently, the index could become not-balanced,
> especially if the primary key is a progressive
> number (an id) generated at creation time (like
> when you draw the numbers from a SEQUENCE).
>
> The stmt is
> ALTER INDEX <pkey index name> REBUILD;
>
> HTH
> Alberto
>
>
>
>
>
>
>
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sun Oct 29 2000 - 06:17:27 CST