Re: use pgsql in a big project, but i found pg has some big problem on concurrency write operation, maybe a joke for myself !

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: use pgsql in a big project, but i found pg has some big problem on concurrency write operation, maybe a joke for myself !
Дата
Msg-id 407d949e1002020808s4235a7d6p541029ead3cab629@mail.gmail.com
обсуждение исходный текст
Ответ на use pgsql in a big project, but i found pg has some big problem on concurrency write operation, maybe a joke for myself !  (wyx6fox@sina.com)
Список pgsql-performance
2010/2/2  <wyx6fox@sina.com>:
> UPDATE webpages SET hits = hits + 1 WHERE url ='some url ';
>
>  when concurrency write transaction on read committed isolation , the hits
> may result wrong .

That should work fine. All updates for the same url will be serialized.


The rest I'm pretty uncertain about what you're describing but I think
you may want to check about whether you need indexes on the other side
of your foreign key constraints. If you're deleting records that are
referred to by your foreign keys or you're updating the primary key
then you'll want this index on the table with the foreign key
constraint as well as the mandatory one on the referenced table.

--
greg

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)