Search Postgresql Archives

Re: Select max(primary_key) taking a long time

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

 



Francisco Reyes <lists@xxxxxxxxxxxxxxxx> writes:
> Tom Lane writes:
>> Francisco Reyes <lists@xxxxxxxxxxxxxxxx> writes:
>>> I am trying to do
>>> select max(primary_key) from some_table;

>> Are there a whole lot of nulls in that column?

> Zero nulls. It is a primary key.

Huh.  The proposed plan should have run in basically zero time then.
You might try strace'ing the backend or attaching to it with gdb to
see what it's doing.

			regards, tom lane

-- 
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