Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 826339FB253 for ; Fri, 9 Feb 2007 14:24:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 66356-06 for ; Fri, 9 Feb 2007 14:24:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smarty.gabriel.co.hu (smarty.gabriel.co.hu [195.70.37.16]) by postgresql.org (Postfix) with ESMTP id 4EF549FB1ED for ; Fri, 9 Feb 2007 14:24:25 -0400 (AST) Received: from localhost (smarty [127.0.0.1]) by smarty.gabriel.co.hu (Postfix) with ESMTP id 8F6F558223 for ; Fri, 9 Feb 2007 19:24:22 +0100 (CET) Received: from smarty.gabriel.co.hu ([127.0.0.1]) by localhost (smarty [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03894-02 for ; Fri, 9 Feb 2007 19:24:22 +0100 (CET) Received: from [192.168.111.135] (customer-174.radio-net.hu [217.113.54.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smarty.gabriel.co.hu (Postfix) with ESMTP id 559ADD3A4 for ; Fri, 9 Feb 2007 19:24:22 +0100 (CET) Message-ID: <45CCBC7B.3090004@i-logic.hu> Date: Fri, 09 Feb 2007 19:24:59 +0100 From: =?ISO-8859-2?Q?G=E1briel_=C1kos?= Organization: I-Logic Kft User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Recreate big table Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at gabriel.co.hu X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/104 X-Sequence-Number: 23158 Hi, We have a quite big table, which is heavily used by our online clients. The table has several indexes, but no other relation to other tables. We have an import process, which can fill/update this table. The full import takes 1 hour, and this is very long. We are thinking of doing the full import in another table and then just "swapping" the two tables. What will happen to our indexes? What will happen to our current transactions (only read) ? What will the user see? :) Should we recreate the indexes after the swap is done? Btw is there a good practice doing this kind of work? Thanks in advance, Akos Gabriel