Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Select are slow after delete command

Re: Select are slow after delete command

From: G R McHugh <gabriel__at_prodigy.net>
Date: Sun, 1 Aug 1999 20:10:47 -0000
Message-ID: <7o329v$1m9q$1@newssvr03-int.news.prodigy.com>


Deleting the rows in a table does not actually reset the high water mark. So when you are performing a full table scan, for example, the select statement still needs to look at all of the blocks allocated to the table. There are three ways to deal with this problem (I can think of):

(1) truncate the table resets high water mark (and loses all records)

(2) export the table with the deleted records drop the table
import the previously exported table

(3) create table temp

     as select * from xyz
           where <deletion_criteria>;

drop table xyz;
rename table temp to xyz;

Hope that helps...

Gabriel McHugh
DBA Consultant
gabe_riel_at_yahoo.com

Břetislav Černík wrote in message <7ns7kt$ugi$1_at_ns.felk.cvut.cz>...
>Hello
>I found the folowing trouble.
>When I delete many rows in table, the select works as slow as there are all
>rows.
>Are there any way, how can I clean table without drop table?
>
>Bretislav Cernik
>xcernikb_at_hwlab.felk.cvut.cz
>
>
Received on Sun Aug 01 1999 - 15:10:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US