Re: Alter Table Command Rearranges Rows - Mailing list pgsql-general

From Richard Broersma
Subject Re: Alter Table Command Rearranges Rows
Date
Msg-id AANLkTimeY-C1RD+socRqRFe2uubRRODhL9eMa5pyZgsH@mail.gmail.com
Whole thread Raw
In response to Re: Alter Table Command Rearranges Rows  (Michael Glaesemann <grzm@seespotcode.net>)
Responses Re: Alter Table Command Rearranges Rows  (Carlos Mennens <carlos.mennens@gmail.com>)
List pgsql-general
On Fri, Sep 17, 2010 at 1:32 PM, Michael Glaesemann
<grzm@seespotcode.net> wrote:

> Postgres (nor any other SQL RDBMS) does not guarantee row order unless you specify it with an ORDER BY clause.

This is true, but some database will maintain a tables clustering.
MS-Access comes to mind.  I don't know if MySQL does this also.

In PostgreSQL you can issue a periodic cluster command on the primary
key.  But as mentioned it is a bad practice to rely on the physical
ordering of the table.

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

pgsql-general by date:

Previous
From: "Joshua J. Kugler"
Date:
Subject: Re: missing chunk number 497 for toast value 504723663
Next
From: bricklen
Date:
Subject: Re: How to generate XML output from a Store Procedure