Re: faster 'delete from'?
Date: 15 May 92 00:06:24 GMT
Message-ID: <2740_at_keele.keele.ac.uk>
Thanks to all (Daniel, Leo, David, Andrew, Marvin, Radhakrishna, Tony, ...) who responded. The suggestions are twofold:
- drop table create table as select * from prototype where 1=0
- wait for V7 ...
My table was just used as workspace in a scheme to compute transitive closures (i.e. "parts explosion", or "descendants"). I ping-pong between two tables, delete-ing from each before I reuse it. They start off with just one tuple, grow to have maybe 500, then fade away again until the closure is complete. I'd use 'connect by' or whatever, but my data is cyclic (call dependencies between software modules).
Timings: delete 600 tuples from table: ~2.0 secs
drop table: ~0.6 secs
create table as select etc.: 0.7 .. 2.6 secs (?)
I don't understand the variation in the 'create table' timing, but I have found that 'delete from' is roughly proportional to the number of tuples deleted.
So I'm better off waiting for V7 (I've already asked our DBA to apply for the Developer's Release).
I wonder whether closure of cyclic graphs is in V7?
__ __ Paul Singleton (Mr) JANET: paul_at_uk.ac.keele.cs |__) (__ Computer Science Dept. other: paul_at_cs.keele.ac.uk | . __). Keele University, Newcastle, tel: +44 (0)782 621111 x7355 Staffs ST5 5BG, ENGLAND fax: +44 (0)782 713082Received on Fri May 15 1992 - 02:06:24 CEST