Re: Delete query takes exorbitant amount of time

From: Oleg Bartunov
Subject: Re: Delete query takes exorbitant amount of time
Date: ,
Msg-id: Pine.GSO.4.62.0503250837140.17555@ra.sai.msu.su
(view: Whole thread, Raw)
In response to: Re: Delete query takes exorbitant amount of time  (Tom Lane)
List: pgsql-performance

Tree view

Delete query takes exorbitant amount of time  (Karim Nassar, )
 Re: Delete query takes exorbitant amount of time  (Tom Lane, )
  Re: Delete query takes exorbitant amount of time  (Mark Lewis, )
   Re: Delete query takes exorbitant amount of time  (Tom Lane, )
    Re: Delete query takes exorbitant amount of time  (Christopher Kings-Lynne, )
    Re: Delete query takes exorbitant amount of time  (Oleg Bartunov, )
    Re: Delete query takes exorbitant amount of time  (Mark Lewis, )
     Re: Delete query takes exorbitant amount of time  (Gaetano Mendola, )
   Re: Delete query takes exorbitant amount of time  (Christopher Kings-Lynne, )
  Re: Delete query takes exorbitant amount of time  (Karim Nassar, )
   Re: Delete query takes exorbitant amount of time  (Josh Berkus, )
    Re: Delete query takes exorbitant amount of time  (Karim Nassar, )
 Re: Delete query takes exorbitant amount of time  (Tom Lane, )
  Re: Delete query takes exorbitant amount of time  (Christopher Kings-Lynne, )
   Re: Delete query takes exorbitant amount of time  (Vivek Khera, )
   Re: Delete query takes exorbitant amount of time  (Tom Lane, )
    Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
     Re: Delete query takes exorbitant amount of time  (Tom Lane, )
      Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
       Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
        Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
         Re: Delete query takes exorbitant amount of time  (Tom Lane, )
          Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
           Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
            Re: Delete query takes exorbitant amount of time  (Tom Lane, )
             Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
         Re: Delete query takes exorbitant amount of time  (Christopher Kings-Lynne, )
     Re: Delete query takes exorbitant amount of time  (Karim Nassar, )
      Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
       Re: Delete query takes exorbitant amount of time  (Karim Nassar, )
        Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
         Re: Delete query takes exorbitant amount of time  (Karim Nassar, )
          Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
           Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
  Re: Delete query takes exorbitant amount of time  (Karim Nassar, )
 Re: Delete query takes exorbitant amount of time  (Tom Lane, )
 Re: Delete query takes exorbitant amount of time  (Josh Berkus, )
  Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
 Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
  Re: Delete query takes exorbitant amount of time  (Karim A Nassar, )
 Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
  Re: Delete query takes exorbitant amount of time  (Karim A Nassar, )
 Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
  Re: Delete query takes exorbitant amount of time  (Karim A Nassar, )
   Re: Delete query takes exorbitant amount of time  (Bruno Wolff III, )
 Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
  Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
   Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
    Re: Delete query takes exorbitant amount of time  (Tom Lane, )
     Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
      Re: Delete query takes exorbitant amount of time  (Tom Lane, )
       Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
        Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
     Re: Delete query takes exorbitant amount of time  (Stephan Szabo, )
   Re: Delete query takes exorbitant amount of time  (Tom Lane, )
   Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
  Re: Delete query takes exorbitant amount of time  (Tom Lane, )
   Re: Delete query takes exorbitant amount of time  (Simon Riggs, )
    Re: Delete query takes exorbitant amount of time  (Tom Lane, )
     Re: Delete query takes exorbitant amount of time  (Simon Riggs, )

On Thu, 24 Mar 2005, Tom Lane wrote:

> Mark Lewis <> 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

and if you add

         Index foo_idx: nn.mm ss
     Heap  foo_tbl: nn.mm ss


>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq
>

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: , http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


pgsql-performance by date:

From: Simon Riggs
Date:
Subject: Re: [BUGS] BUG #1552: massive performance hit between 7.4 and 8.0.1
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #1552: massive performance hit between 7.4 and 8.0.1