pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: David M. Richter <D.Richter@DKFZ-heidelberg.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Plsql Function with error: No space left on 	device.
Date: Tue, 26 Jun 2001 14:32:55 +0100
Message-ID: <007101c0fe44$83877de0$1001a8c0@archonet.com> (raw)
References: <3B36FB6E.1039F0D4@DKFZ-heidelberg.de>
	<005601c0fd60$db576740$1001a8c0@archonet.com>
	<3B3872E5.65A6B538@DKFZ-heidelberg.de>

From: "David M. Richter" <D.Richter@DKFZ-heidelberg.de>

> Hallo Richard!
>
> Thanks a lot for Your hint. It works. Yeah.
> But only in a little database of 1000 rows.
> In my case with 4 milions of rows I was waiting 17 hours without any
> success by using the processor 97%.
> So I canceled the Job.

Patience is a virtue, but nobody is *that* virtuous.

> What could i optimize in this query?

Not much as it stands, it couldn't be much simpler.

> Do You perhaps have another great hint?

Well - if you've been drinking all night, have a glass of water before going
to bed - always served me well ;-)

We're going to need some more information. Try EXPLAIN <update query> and
post the results along with the \d for the two tables and how many records
are in each. Oh - and how many distinct values for each field there are.

I'm assuming for any childoid there is only one corresponding parentoid in
relseries_image? If so, and values of childoid are repeated many times, try
selecting unique pairs into a temporary table. Join against that for the
update. It could be that PG is ending up with a zillion rows in the join.

- Richard Huxton




view thread (9+ messages)  latest in thread

Message-ID: <007101c0fe44$83877de0$1001a8c0@archonet.com>
Permalink:  ../007101c0fe44$83877de0$1001a8c0@archonet.com/
Also on:    postgresql.org/message-id/007101c0fe44$83877de0$1001a8c0@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, D.Richter@DKFZ-heidelberg.de
  Subject: Re: Plsql Function with error: No space left on 	device.
  In-Reply-To: <007101c0fe44$83877de0$1001a8c0@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox