Re: Emptying Tables
Posted in 1998
Robert Read wrote: > > Herb Blacker wrote: > > > Is there an easy way to quickly empty a table, other than either > > "delete from xxx where 1=1;" or dropping the table and recreating it? > > I'm an old Ingres DBA, and there used to be an 'initialize' SQL > > command to quickly empty a table. > > A compromise solution might be to drop the indexes and then delete and then > recreate the indexes, but I guess that wouldn't be very easy unless you wrote > a script to do it, and it would still be faster to just drop the table. > > If you do drop the table, then don't forget to specify the extent size when > you recreate it. Instead of dropping indexes you could just disable them (version 7.10+). -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 Mail: Peter.Lancashire.PL1@bayer.co.uk --- My Internet plumbing does not allow me to mail and post news together. Sorry. All opinions are my own and not those of Bayer plc. --- Join Infuse, the UK Informix User Group at http://www.infuse.co.uk/