Search Postgresql Archives

Select max(id) causes AccessExclusiveLock?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux