From: | svein(dot)skarstein(at)weather(dot)no (Svein Are) |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | PG 7.1.3, copy from file suddenly goes very slow |
Date: | 2002-02-28 17:30:26 |
Message-ID: | b657e362.0202280930.6a049571@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi
I have been using Postgresql for about 3 weeks now with no problem.
The main task I use PG for is to import data from a file to a
temporary
table, which triggers a function that inserts (unique) data to the
"main-table" (called metar)
Today suddenly everything went *very* slow. Restart of
server/postgresql and
running vacuum did not help. I have now approx. 800 000 rows in the
"main-table", disk usagem approx. 1GB.
The function triggered when inserting data to temporary table looks
like:
CREATE FUNCTION test_inserted_data() RETURNS OPAQUE AS '
DECLARE
curr_val TEXT;
BEGIN
SELECT UNIK_ID INTO curr_val FROM metar WHERE unik_id = new.UNIK_ID;
IF NOT FOUND THEN
insert into metar(
...... (text excluded)
ELSE
update metar set
....... (text excluded)
WHERE UNIK_ID = new.UNIK_ID;
END IF;
RETURN old;
END;
...where unik_id is an index
Have I somehow ran my head into a limitation in my current setup of
Postgresql? My postgresql.conf is "empty", that is: everything is
commented out as default.
Hope someone has ideas about this!
best regards
Svein Are
Norway
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-02-28 18:05:37 | Re: Defunct postmasters |
Previous Message | Gavin Scott | 2002-02-28 17:16:07 | Re: Defunct postmasters |