Nick Burrett <nick@dsvr.net> writes:
> Tom Lane wrote:
>> We don't normally hear of people needing that --- is there anything
>> unusual about the schema of this database?
> Not particularly. The database consists of around 3000 tables created
> using this:
> CREATE TABLE vs_foo (date date NOT NULL,
> time time NOT NULL,
> bytesin int8 CHECK (bytesin >= 0),
> bytesout int8 CHECK (bytesout >= 0));
> Each table has around 1500 rows.
3000 tables? That's why you need so many locks. Have you thought about
collapsing these into *one* table with an extra key column? Also, it'd
likely be better to combine the date and time into a timestamp column.
regards, tom lane