On table
create table MyTableName (
id integer not null primary key,
seqYear char(4),
seqCount integer,
...)
Where id is primary key and (seqYear, seqCount) is a unique index.
Table facts: about 40 fields, 1 million records.
When I issue a
select max(id) from MyTableName
Postgres 9.2.7 is scaling a AccessExclusiveLock and causing large delays.
Is that expected? Is there a way to avoid the AccessExclusiveLock?
Thanks,
Edson