Re: Update command too slow

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Update command too slow
Дата
Msg-id 874qgnmanh.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на Re: Update command too slow  (Venkatesh Babu <venkatbabukr@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: Creating an index-type for LIKE '%value%'
Следующее
От: Marco Colombo
Дата:
Сообщение: Re: Safely Killing Backends (Was: Applications that leak connections)