From: | Ian Harding <iharding(at)pakrat(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Re: Loading optimization |
Date: | 2001-01-11 06:21:01 |
Message-ID: | 3A5D50CD.31310F0F@pakrat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com> writes:
> > But does postgres actually use the fact that the data is clustered?
>
> The planner has no idea that the table is clustered, and will estimate
> indexscan costs on the assumption that the data is randomly ordered in
> the table. So you're likely to get a seqscan plan for queries where
> indexscan would actually be faster. This is something we need to fix,
> but the main problem is accounting for the fact that the clustered order
> will degrade over time as data is added/updated. See past discussions
> in pghackers.
>
> The CLUSTER implementation is so shoddy at the moment that I'm hesitant
> to encourage people to use it anyway :-(. We've got to rewrite it so
> that it doesn't drop other indexes, lose constraints, break foreign
> key and inheritance relationships, etc etc.
>
> regards, tom lane
Are the problems with CLUSTER isolated to the creation of the clustering,
or the maintenance of it? If I cluster an index before I create any
relationships, constraints, or other indexes, (or load any data for that
matter) am I going to be OK? BTW, Microsoft recommends creating clustered
indexes first, because creating one will cause all other existing indexes
to be dropped and recreated. That bit makes sense, since rebuilding all
your indexes might take some time, and they have to be recreated since the
data has moved, right?
Ian
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Cannon-Brookes | 2001-01-11 07:28:34 | RE: PostgreSQL v7.1BETA3 Bundled and Available ... |
Previous Message | Neil Conway | 2001-01-11 05:59:13 | Re: Removing the row limit |