Re: Very slow stored proc - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Very slow stored proc
Date
Msg-id 20041223233515.GA11892@dcc.uchile.cl
Whole thread Raw
In response to Re: Very slow stored proc  (Együd Csaba (Freemail) <csegyud@freemail.hu>)
List pgsql-general
On Thu, Dec 23, 2004 at 11:23:30PM +0100, Együd Csaba (Freemail) wrote:

Együd,

> Sorry for misspelling your name. It is almost midnight here...

Ah, never mind!  I don't really care that much about it ...

> So Dear Alvaro, [is it ok? :)]

Well, not completely, because it's really Álvaro, though I don't use
that form because of issues with email headers (maybe I should); but
I don't think it's that important anyway.

> This table is updated (not inserted... just updated) by another server in
> every minutes. The procedure creates a few (configurable number of) empty
> minutes in advance as a placeholder for the coming measured values. If there
> are no empty minute records the value is lost.
> If the db server is off for a long time, the minutes must be created
> backwards too to avoid the holes. This situation is where many thousands of
> records must be inserted at once.

Oh, certainly you can't do that with an SRF.  It seems a weird strategy
to me anyway.  Not sure why you need the placeholders instead of just
inserting the measured values, but what do I know of your situation ...

> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 2004.12.22.

Huh, are you aware that your mail server insert several of these little
trailers to each outgoing message?

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Hoy es el primer día del resto de mi vida"

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: select as
Next
From: Dick Davies
Date:
Subject: Re: monitoring tools