From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | "Viorel Dragomir" <bc(at)vio(dot)ro>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: transactions |
Date: | 2003-07-29 19:28:13 |
Message-ID: | 200307291228.13273.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Viorel,
> The problem is that my web browser hangs on this query and stays that way a
> lot [like 30 minutes -- i forgot about it and after 30 minutes it was still
> trying to open the result page]
I think this is a problem inside one of the functions; either you have an
endless loop, or you are doing a huge unindexed join operation or something
similar. Enclosing the two functions inside a transaction by itself
shouldn't cause a time-out.
One thing that can mess things up vis-a-vis transactions:
If you have a function which does a series of large cascading updates -- that
is, the function uses the updated table from step #2 to perform step #3, and
step #3 to do step #4, and each update is 1000's of rows -- then execution
can really bog down due to the lack of VACUUMing between updates. However,
you can't VACUUM without committing the transaction.
Just in case, I'd suggest doing a VACUUM ANALYZE right before running your big
transaction.
--
Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | btober | 2003-07-29 20:16:02 | Does a the block of code within a stored procedure constitute a transaction? |
Previous Message | Viorel Dragomir | 2003-07-29 18:14:53 | transactions |