Wes <wespvp(at)syntegra(dot)com> writes:
> As I recall, the last time we rebuilt our database, it took about 3 hours to
> import 265 million rows of data. It then took another 16 hours to rebuild
> all the indexes.
Out of curiosity, what value of sort_mem were you using?
(In PG 8.0, the sort memory setting used by CREATE INDEX will be
maintenance_work_mem not work_mem, which should help in getting larger
values to be used. But in existing releases you usually need to think
about a manual tweak.)
regards, tom lane