Em Segunda 12 Junho 2006 04:24, surabhi.ahuja escreveu: > hi, > I am using postgresql 8.0.0. > i have four tables in my database > TAB1, has one primary key T1 > > TAB2 , has 2 fields, one is the primary ley T2 and the other one is the > foreign key T1(from TAB1) > > TAB3 also has 2 fields, one is the primary ley T3 and the other is the > foreign key T2(from TAB2) > > TAB4 has 2 fields again, primary key T4 and a foreign key T3(from TAB3) > > the disk is 100% full. > > i open psql <datbase_name> and do > delete from TAB1 > > nothing seems to be happening for a long time, although when i do top, it > shows postgres taking 99%. > > what is happening, cant delete be quickened? Good question. It can be made better if you have all correct indices. If you're missing some of them, and if you have a huge amount of data, then it might take a long time since for each data on your TAB1 it will have to search *all* data on the other tables to see if the value can be removed or not. To know exactly what is happening, try using strace / ltrace. You'll be able to see where PostgreSQL is spending time and what it is doing. -- Jorge Godoy <godoy@xxxxxxxxxxxxxxx>