Re: Select max(primary_key) taking a long time - Mailing list pgsql-general

From Francisco Reyes
Subject Re: Select max(primary_key) taking a long time
Date
Msg-id cone.1274570575.501300.30938.1000@shelca
Whole thread Raw
In response to Select max(primary_key) taking a long time  (Francisco Reyes <lists@stringsutils.com>)
List pgsql-general
Merlin Moncure writes:

> do a big delete recently?  any other open transactions?

Some inserts were taking place. Roughly 2 to 5 million rows inside
transactions. We were doing some ETL and each batch represented a file we
were loading. We need to have the entire file or roll back so each file is
done within a transaction.

> the remedy for the former is to simply eat it (one time penalty) or
> rebuild the table.  for the latter you simply have to resolve the
> other transaction.

I think it is related to the inserts... after they were done everything was
back to normal.

> how big is your table according to pg_relation_size()?

\dt+ is easier. :-)
116GB

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Alter column position
Next
From: Luis Daniel Lucio Quiroz
Date:
Subject: Moving from Mysql