Re: Load experimentation
От
Scott Marlowe
Тема
Re: Load experimentation
Дата
Msg-id
dcc563d10912080128n204062cvad5279036f81ce5e@mail.gmail.com
Ответ на
Re: Load experimentation (Dimitri Fontaine)
Список
Дерево обсуждения
Load experimentation Ben Brehmer <benbrehmer@gmail.com>
Re: Load experimentation "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Load experimentation Ben Brehmer <benbrehmer@gmail.com>
Re: Load experimentation Thom Brown <thombrown@gmail.com>
Re: Load experimentation Ben Brehmer <benbrehmer@gmail.com>
Re: Load experimentation Alan Hodgson <ahodgson@simkin.ca>
Re: Load experimentation Craig James <craig_james@emolecules.com>
Re: Load experimentation Greg Smith <greg@2ndquadrant.com>
Re: Load experimentation Ben Brehmer <benbrehmer@gmail.com>
Re: Load experimentation Greg Smith <greg@2ndquadrant.com>
Re: Load experimentation Scott Marlowe <scott.marlowe@gmail.com>
Re: Load experimentation Scott Marlowe <scott.marlowe@gmail.com>
Re: Load experimentation Dimitri Fontaine <dfontaine@hi-media.com>
Re: Load experimentation Scott Marlowe <scott.marlowe@gmail.com>
Re: Load experimentation Dimitri Fontaine <dfontaine@hi-media.com>
Re: Load experimentation Scott Carey <scott@richrelevance.com>
Re: Load experimentation Scott Carey <scott@richrelevance.com>
Re: Load experimentation Craig James <craig_james@emolecules.com>
Re: Load experimentation Andy Colson <andy@squeakycode.net>
Re: Load experimentation Ben Brehmer <benbrehmer@gmail.com>
Re: Load experimentation Scott Mead <scott.lists@enterprisedb.com>
On Tue, Dec 8, 2009 at 2:08 AM, Dimitri Fontaine wrote: > Hi, > > Ben Brehmer writes: >> By "Loading data" I am implying: "psql -U postgres -d somedatabase -f sql_file.sql". The sql_file.sql contains table creates and insert statements. There are no >> indexes present nor created during the load. >> >> OS: x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) >> >> PostgreSQL: I will try upgrading to latest version. >> >> COPY command: Unfortunately I'm stuck with INSERTS due to the nature >> this data was generated (Hadoop/MapReduce). > > What I think you could do is the followings: > > - switch to using 8.4 > - load your files in a *local* database > - pg_dump -Fc > - now pg_restore -j X on the amazon setup > > That way you will be using COPY rather than INSERTs and parallel loading > built-in pg_restore (and optimisations of when to add the indexes and > constraints). The X is to choose depending on the IO power and the > number of CPU... That's a lot of work to get to COPY. It might be enough to drop all FK relations and indexes on the destination db in the cloud, load the data in a few (or one) transaction(s), then recreate indexes and FK relationships.
В списке pgsql-performance по дате отправления