listen/notify vs. sequence-model

Поиск
Список
Период
Сортировка
От pilsl@goldfisch.at
Тема listen/notify vs. sequence-model
Дата
Msg-id 20030407153604.GA10802@goldfisch.at
обсуждение исходный текст
Список pgsql-general
for a caching-application I need to implement an indicator if my table
has been changed.

I will create three rules (insert, update, delete) and then imho there
are two ways to continue:

I could simply send notifies on changes and my application listen to
the notify or I could increment a sequence and the application queries
and memorize the value of the sequence.

The solution with the sequence would have the big advantage that the
application must not keep the db-handle open all the time. (the
solution would work with cgi also and not only with mod_perl in my
case)

My question is, if the sequence-model has very poor performance
compared to the listen/notify-modell.

I need three rules in both models. In the first case I need to send
and listen a notify.
In the second case I need to update and query a sequence.

thnx,
peter

ps: are rules executed when the current transaction is closed or
immediately after the corresponding statement ?




--
mag. peter pilsl
IT-Consulting
tel: +43-699-1-3574035
fax: +43-699-4-3574035
pilsl@goldfisch.at
http://www.goldfisch.at


В списке pgsql-general по дате отправления:

Предыдущее
От: "Dan Langille"
Дата:
Сообщение: Re: possible time change issue - known problem?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: possible time change issue - known problem?