Re: Delete query takes exorbitant amount of time

From: Tom Lane
Subject: Re: Delete query takes exorbitant amount of time
Date: ,
Msg-id: 21616.1112108201@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: Delete query takes exorbitant amount of time  (Stephan Szabo)
Responses: Re: Delete query takes exorbitant amount of time  (Simon Riggs)
Re: Delete query takes exorbitant amount of time  (Stephan Szabo)
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, )

Stephan Szabo <> writes:
> If there were some way to pass a "limit" into SPI_prepare that was treated
> similarly to a LIMIT clause for planning purposes but didn't actually
> change the output plan to only return that number of rows, we could use
> that.

Hmm ... the planner does have the ability to do that sort of thing (we
use it for cursors).  SPI_prepare doesn't expose the capability.
Perhaps adding a SPI_prepare variant that does expose it would be the
quickest route to a solution.

I get a headache every time I look at the RI triggers ;-).  Do they
always know at the time of preparing a plan which way it will be used?

            regards, tom lane


pgsql-performance by date:

From: Michael Fuhr
Date:
Subject: Re: Million of rows
From: Vinicius Bernardi
Date:
Subject: Re: Million of rows