Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 64B159FA12B for ; Mon, 9 Oct 2006 20:51:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 18409-03 for ; Mon, 9 Oct 2006 20:51:38 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by postgresql.org (Postfix) with ESMTP id 379D99F9945 for ; Mon, 9 Oct 2006 20:51:37 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id m18so102212nfc for ; Mon, 09 Oct 2006 16:51:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=QgyfB2d3NDGJgIZs+oYtETZhRzRzJfjBBqVEJQ8CtHEan9myEMr8YHyuQ/68qqy8NVucbS9yz//LInIU/7cWQjfvjb7NpH1a83YbVA6xN0Cg1wgft3/w56UZsFVTDElHqjoNLTBEy5gj9980+BypNxcYx9Ml10TEKagbAz6iyiY= Received: by 10.82.111.8 with SMTP id j8mr724641buc; Mon, 09 Oct 2006 16:51:35 -0700 (PDT) Received: by 10.82.183.4 with HTTP; Mon, 9 Oct 2006 16:51:35 -0700 (PDT) Message-ID: <621eda8a0610091651oc78994fy2b358260f5c9b58a@mail.gmail.com> Date: Tue, 10 Oct 2006 01:51:35 +0200 From: "Fourat Zouari" To: pgsql-novice@postgresql.org, pgsql-admin@postgresql.org Subject: Copying data from table to table (cloned tables) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_25293_5149452.1160437895261" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.995 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_00_10, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/57 X-Sequence-Number: 23360 ------=_Part_25293_5149452.1160437895261 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. ------=_Part_25293_5149452.1160437895261 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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.
------=_Part_25293_5149452.1160437895261--