Skip site navigation (1) Skip section navigation (2)

Copying data from table to table (cloned tables)

From: "Fourat Zouari" <fourat(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Copying data from table to table (cloned tables)
Date: 2006-10-09 23:51:35
Message-ID: 621eda8a0610091651oc78994fy2b358260f5c9b58a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-novice
Hello all,
Any one could suggest the best way to copy data from table to table in the
same db, the reason why am seeking for this is that the first table is
becoming very big, and old data has no reason why to stay there, so i
created a cloned table but without indexes and constraints (lighter) and now
i would like to copy 'some' data from first to second table (copied data is
data older than 3 months, i have a timestamp column).

In other way, i have a table called 'hotqueues' where i store fresh messages
queued, once messages are treated, they stay in 'hotqueues' but with a flag
indicating that their arent queued for treatment..
so in this way, data will rest there forever, slowing down any searches in
that table, the solution was to copy old messages to another table called
'coldqueues' that has the same structure as 'hotqueues' but lighter (without
constraints and indexes).
How to copy these data with 100% data-loose free.

Thanks for any help you can provide.

Responses

pgsql-novice by date

Next:From: Bricklen AndersonDate: 2006-10-10 00:02:07
Subject: Re: Copying data from table to table (cloned tables)
Previous:From: Saranya SivakumarDate: 2006-10-09 21:24:18
Subject: Re: pg_config not found

pgsql-admin by date

Next:From: Bricklen AndersonDate: 2006-10-10 00:02:07
Subject: Re: Copying data from table to table (cloned tables)
Previous:From: Ray StellDate: 2006-10-09 12:39:38
Subject: Re: Cant connect to psql on winxp

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group