Re: cluster index on a table - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: cluster index on a table
Date
Msg-id 4A5F43E3020000250002886C@gw.wicourts.gov
Whole thread Raw
In response to Re: cluster index on a table  (Scara Maccai <m_lists@yahoo.it>)
Responses Re: cluster index on a table
List pgsql-performance
Scara Maccai <m_lists@yahoo.it> wrote:

> What am I doing wrong?

> [function which uses INSERT/UPDATE/DELETE statements to try to force
> order of rows in heap]

You seem to be assuming that the rows will be in the table in the
sequence of your inserts.  You might be better off with a CLUSTER on
some index.  (There are a few other options, like TRUNCATE / INSERT or
SELECT INTO / DROP TABLE / ALTER TABLE RENAME -- but CLUSTER is
probably the safest, easiest way to go.)

-Kevin

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Very big insert/join performance problem (bacula)
Next
From: Dimitri Fontaine
Date:
Subject: Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1