--------------------------------------------------
From: "Richard Huxton" <d...@archonet.com>

Of course, if you're going to have a separate table then you might as well store the count in there and actually update it on every insert/update/delete. Assuming you might find the count of some use somewhere. Set the fill-factor for the lock table and HOT should prevent the table bloating too.


I think

PERFORM * FROM items WHERE owner = name FOR UPDATE;

sounds like it should work the best. What are the downsides for this that would require the further table of counts? FWIW items has a SERIAL primary key so FOR UPDATE should work on it.

Shak

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to