Re: Select max(primary_key) taking a long time

From: Francisco Reyes <lists(at)stringsutils(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Select max(primary_key) taking a long time
Date: 2010-05-21 17:48:03
Message-ID: cone.1274464083.213012.30938.1000@shelca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane writes:

> Francisco Reyes <lists(at)stringsutils(dot)com> 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-05-21 18:16:53 Re: Select max(primary_key) taking a long time
Previous Message Tom Lane 2010-05-21 17:36:24 Re: getting all constraint violations