Re: Delete query takes exorbitant amount of time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Delete query takes exorbitant amount of time
Дата
Msg-id 4009.1111717976@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Delete query takes exorbitant amount of time  (Mark Lewis <mark.lewis@mir3.com>)
Ответы Re: Delete query takes exorbitant amount of time  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: Delete query takes exorbitant amount of time  (Oleg Bartunov <oleg@sai.msu.su>)
Re: Delete query takes exorbitant amount of time  (Mark Lewis <mark.lewis@mir3.com>)
Список pgsql-performance
Mark Lewis <mark.lewis@mir3.com> writes:
> I've got a similar problem with deletes taking a very long time.  I know
> that there are lots of foreign keys referencing this table, and other
> foreign keys referencing those tables, etc.  I've been curious, is there
> a way to find out how long the foreign key checks take for each
> dependent table?

There is not any easy way at the moment.

Hmm ... I wonder how hard it would be to teach EXPLAIN ANALYZE to show
the runtime expended in each trigger when the statement is of a kind
that has triggers.  We couldn't break down the time *within* the
triggers, but even this info would help a lot in terms of finger
pointing ...

    Seq Scan on ... (nn.nnn ms)
    Trigger foo: nn.mmm ms
    Trigger bar: nn.mmm ms
    Total time: nn.mmm ms

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Delete query takes exorbitant amount of time
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Delete query takes exorbitant amount of time