2010/2/2 <wyx6fox@xxxxxxxx>: > 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 -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance