| From: | Dario Beraldi <dario(dot)beraldi(at)ed(dot)ac(dot)uk> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Cluster table and order information |
| Date: | 2011-02-01 15:08:50 |
| Message-ID: | 20110201150850.16983a7zl0jhi42s@www.staffmail.ed.ac.uk |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hello,
From the documentation of CLUSTER table
(http://www.postgresql.org/docs/8.4/static/sql-cluster.html) I
understand that clustering can be achieved by re-creating the table
like this:
CREATE TABLE newtable AS
SELECT * FROM table ORDER BY columnlist;
My question is: If I upload with COPY a datafile which is already
correctly sorted, can I inform postgres of such order, so that no
clustering is necessary after the import? In other words, how can I
tell postgres that my file is order by this and that column?
Many thanks!
Dario
--
Dr. Dario Beraldi
Institute of Evolutionary Biology
University of Edinburgh
West Mains Road
Edinburgh EH9 3JT
Scotland, UK
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andy Colson | 2011-02-01 15:19:17 | Re: Select for update with offset interferes with concurrent transactions |
| Previous Message | Adrian Klaver | 2011-02-01 14:57:26 | Re: cast problem in Postgresql 9.0.1 |