Re: preventing deadlocks

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: preventing deadlocks
Дата
Msg-id 20060105084030.GA32572@wolff.to
обсуждение исходный текст
Ответ на Re: preventing deadlocks  (Tsirkin Evgeny <tsurkin@mail.jct.ac.il>)
Ответы Re: preventing deadlocks
Список pgsql-admin
On Thu, Jan 05, 2006 at 10:34:31 +0200,
  Tsirkin Evgeny <tsurkin@mail.jct.ac.il> wrote:
>
> I understand THAT ,I meant why int will give me more performance.

Because if you have a bunch of processes sitting around waiting for table
locks, the average time to process queries will be higher. If you are
already limited by IO throughput or CPU usage this may not be a big deal,
but in many cases it will be.

> Well i DO have a lot of concurrent queries,that is the whole point.

Then you probably want to do what people have been recommending you do.

> That does not help me .What i want is :
> select 1 from table a where whatever for update;
> issuing this should fire a trigger that does:

You can't trigger on select statements. So this approach won't workin any case.

> select 1 from table counter where a.pkey=counter.ident or something
> however this should only be done for select FOR UPDATE!
> And i can't know that inside the trigger!

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

Предыдущее
От: Tsirkin Evgeny
Дата:
Сообщение: Re: preventing deadlocks
Следующее
От: Tsirkin Evgeny
Дата:
Сообщение: Re: preventing deadlocks