Re: cluster index on a table

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

 



Scara Maccai <m_lists@xxxxxxxx> 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

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

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux