Re: delete seems to be getting blocked

Поиск
Список
Период
Сортировка
От Jorge Godoy
Тема Re: delete seems to be getting blocked
Дата
Msg-id 200606120817.46889.godoy@metalab.unc.edu
обсуждение исходный текст
Ответ на delete seems to be getting blocked  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
Список pgsql-general
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@metalab.unc.edu>


В списке pgsql-general по дате отправления:

Предыдущее
От: ptjm@interlog.com (Patrick TJ McPhee)
Дата:
Сообщение: Re: are there static variables in pgsql?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: delete seems to be getting blocked