Re: Update command too slow - Mailing list pgsql-general

From Doug McNaught
Subject Re: Update command too slow
Date
Msg-id 874qgnmanh.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Re: Update command too slow  (Venkatesh Babu <venkatbabukr@yahoo.com>)
List pgsql-general
Venkatesh Babu <venkatbabukr@yahoo.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

pgsql-general by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: Creating an index-type for LIKE '%value%'
Next
From: Marco Colombo
Date:
Subject: Re: Safely Killing Backends (Was: Applications that leak connections)