Re: Speed while runnning large transactions.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: jesper(at)krogh(dot)cc
Cc: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Speed while runnning large transactions.
Date: 2009-09-29 21:28:06
Message-ID: 603c8f070909291428w781b138ck5e8004aec0a95c9b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

2009/9/24 <jesper(at)krogh(dot)cc>:
>> On Thu, Sep 24, 2009 at 9:27 AM, <jesper(at)krogh(dot)cc> wrote:
>>
>>> Hi.
>>>
>>> I have a transaction running at the database for around 20 hours ..
>>> still
>>> isn't done. But during the last hours it has come to the point where it
>>> really hurts performance of "other queries".
>>>
>>> Given pg_stat_activity output there seems to be no locks interfering but
>>> the overall cpu-usage of all queries continue to rise. iowait numbers
>>> are
>>> also very low.
>>>
>>> What can I do to make the system handle other queries better?
>>>
>>> show us explain from the query(s).
>> use select * from pg_stat_activity to find out the state query is in, and
>> perhaps which one of the queries it really is.
>
> I'm actively monitoring pg_stat_activity for potential problems but the
> thread is spending most of the time in the application side. The
> transaction is holding a large set of inserts/update and delete for the
> DB.

I don't think there's much you can do about this. Your other
transactions are probably slowing down due to accumulation of dead row
versions that VACUUM can't collect because they are still visible to
your long-running transaction.

You might need to think about replicating some of your data to a
reporting server.

...Robert

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2009-09-29 22:58:59 Re: FullTextSearch - UNION individual indexes or concatenated columns index ?
Previous Message Jeremy Ferrante 2009-09-29 19:34:22 FullTextSearch - UNION individual indexes or concatenated columns index ?