Re: Update command too slow

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Venkatesh Babu <venkatbabukr(at)yahoo(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Update command too slow
Date: 2005-02-08 13:41:38
Message-ID: 874qgnmanh.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Venkatesh Babu <venkatbabukr(at)yahoo(dot)com> writes:

> Hello,
>
> Thanks for providing info... I tried disabling
> autocommit, as suggested by Mr. Greg Stark, I tried
> issuing the command "set autocommit to off", but got
> the following error message:
>
> ERROR: SET AUTOCOMMIT TO OFF is no longer supported

Autocommit is handled by the drivers now.

> Also, I can't implement the suggestions of Mr.
> Christopher Browne, because I'm not working with
> database directly. There is an abstract layer built
> over the database. This abstract layer provides an
> interface between application objects and data tables
> corresponding to those objects. Our application is
> developed over this abstract layer. Infact, we are
> using "Collection" datatype provided by this layer.
> Collection is similar to java vectors in that it can
> store any kind of persistable objects, also it
> implements the save method (which updates the tables
> corresponding to each object present in the
> collection), hence one update statement generated per
> object present in the collection.

Sounds like Hibernate--is that what you're using? Make sure you use
your mapping library's transaction mechanism to execute the save()
inside a transaction and you may get get some speedup.

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2005-02-08 13:57:10 Re: Safely Killing Backends (Was: Applications that leak connections)
Previous Message Larry Rosenman 2005-02-08 13:27:49 Re: Creating an index-type for LIKE '%value%'