Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id EC7749FB1C4 for ; Fri, 9 Feb 2007 15:10:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 24840-04 for ; Fri, 9 Feb 2007 15:10:33 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by postgresql.org (Postfix) with ESMTP id E7DCA9FB1BD for ; Fri, 9 Feb 2007 15:10:32 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so776099ugf for ; Fri, 09 Feb 2007 11:10:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qKn/X8wW2oqSLM3Wf9MKzikfbwcZMClPTmq3DuAEmJeeJq+4AxiGTXsEVJhx3SfcpecLOQaf2rRMp1JvU7yCvC3M+M0avRMVmAEecXJSc+PK6YheuaMUJadb0gLWbcCDgD5Xyo0p1hROfsJ1PtLpxWVji+XORU3KFKLMGMkdTAQ= Received: by 10.78.185.7 with SMTP id i7mr5102901huf.1171048230247; Fri, 09 Feb 2007 11:10:30 -0800 (PST) Received: by 10.78.191.14 with HTTP; Fri, 9 Feb 2007 11:10:30 -0800 (PST) Message-ID: <48d0cacb0702091110m2f512224waf7566891d59c068@mail.gmail.com> Date: Fri, 9 Feb 2007 17:10:30 -0200 From: "Daniel Cristian Cruz" Subject: Re: Recreate big table Cc: pgsql-performance@postgresql.org In-Reply-To: <45CCBC7B.3090004@i-logic.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <45CCBC7B.3090004@i-logic.hu> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/106 X-Sequence-Number: 23160 G=E1briel, You could use table inheritance, like table partitioning is explained in ma= nual: http://www.postgresql.org/docs/8.2/interactive/ddl-partitioning.html Kind regards, Daniel Cristian On 2/9/07, G=E1briel =C1kos wrote: > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > --=20 Daniel Cristian Cruz Analista de Sistemas Especialista postgreSQL e Linux Instrutor Certificado Mandriva