Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 62F471337C0C for ; Mon, 9 May 2011 07:19:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 39255-02 for ; Mon, 9 May 2011 10:19:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by mail.postgresql.org (Postfix) with ESMTP id 2F4571337BCC for ; Mon, 9 May 2011 07:19:36 -0300 (ADT) Received: from [10.100.1.32] ([80.13.5.220]) by mwinf5d16 with ME id hNKW1g0064kpSGo03NKWnd; Mon, 09 May 2011 12:19:36 +0200 Message-ID: <4DC7BFB2.7080106@hbs-research.com> Date: Mon, 09 May 2011 12:19:30 +0200 From: adrien ducos User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: =?UTF-8?B?VmlrdG9yIEJvam92acSH?= CC: "pgsql-admin@postgresql.org" Subject: Re: db restore takes to long References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201105/72 X-Sequence-Number: 37509 It seams there is no option like that in pg_dump or pg_restore. But You can manualy do it in the dump or with a sed command finding the lines begining by CREATE INDEX and removing them. We also have a big database and since postgres 8.4 pg_restore is much faster with the option --jobs=x where x is the number of cores you have in your microprocessor. It then divides the restore script into different jobs and goes faster using multithreading. example: pg_restore --username postgres --jobs=4 --dbname=your_db_name your_dump_file Here is if you have a quad core. Adrien Viktor Bojović a écrit : > Hi, > > im trying to restore 250GB database, but indexing takes too long, so > restore takes more then 12h. > Is it possible to disable indexing while restoring database? > > Thanx in advance > > > -- > --------------------------------------- > Viktor Bojović > --------------------------------------- > Wherever I go, Murphy goes with me -- Logo_HBS_mail.jpg Adrien DUCOS Analyste développeur aducos@hbs-research.com www.hbs-research.com +33 (0)9 70 44 64 10 24 rue de l'Est 75020 Paris