Re: db restore takes to long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx <mailto:aducos@xxxxxxxxxxxxxxxx>
  www.hbs-research.com <http://www.hbs-research.com/>
  +33 (0)9 70 44 64 10
  24 rue de l'Est
  75020 Paris




--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux