"Steinar H. Gunderson" <[EMAIL PROTECTED]> writes:
> I'm using PostgreSQL 8.1 beta 3 (packages from Debian experimental), and I
> have a (rather complex) query that seems to take forever -- when the database
> was just installed, it took about 1200ms (which is quite good, considering
> that the 7.4 system this runs on today uses about the same time, but has
> twice as much CPU power and runs sequential scans up to eight times as fast),
> but now I can never even get it to complete. I've tried running it for half
> an hour, but it still doesn't complete, so I'm a bit unsure what's going on.

That mdb_gruppekobling_transitiv_tillukning function looks awfully
grotty ... how many rows does it return, and how long does it take to
run by itself?  How often does its temp table get vacuumed?  A quick
band-aid might be to use TRUNCATE instead of DELETE FROM to clean the
table ... but if I were you I'd try to rewrite the function entirely.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to