Skip site navigation (1) Skip section navigation (2)

Index creation

From: "Eric Jain" <Eric(dot)Jain(at)isb-sib(dot)ch>
To: "pgsql-performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Index creation
Date: 2004-01-07 17:08:06
Message-ID: 001101c3d540$d3ea8090$c300000a@caliente (view raw or flat)
Thread:
Lists: pgsql-performance
Any tips for speeding up index creation?

I need to bulk load a large table with 100M rows and several indexes,
some of which span two columns.

By dropping all indexes prior to issuing the 'copy from' command, the
operation completes 10x as fast (1.5h vs 15h).

Unfortunately, recreating a single index takes nearly as long as loading
all of the data into the table; this more or less eliminates the time
gained by dropping the index in the first place.

Also, there doesn't seem to be a simple way to disable/recreate all
indexes for a specific table short of explicitely dropping and later
recreating each index?

--
Eric Jain


Responses

pgsql-performance by date

Next:From: JeffDate: 2004-01-07 17:20:15
Subject: Re: Index creation
Previous:From: D. Dante LorensoDate: 2004-01-07 16:57:38
Subject: Find original number of rows before applied LIMIT/OFFSET?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group