Thanks for the link! Alternatively, when I am trying to create an index on a column of a table which is of size 400 GB, it is taking roughly 7 hrs. The index is created only on one column which is not a primary key. The query I am using is, create index on table (colname). I request your valuable suggestions for the same. The configuration parameters are:
shared_buffers =12GB maintainence_work_mem = 8GB work_mem = 1GB fsync = off synchronous_commit = off checkpoint_segments = 256 checkpoint_timeout = 1h checkpoint_completion_target = 0.9 checkpoint_warning = 0 autovaccum = off Regards, Srinivas Karthik On Wed, Jul 4, 2018 at 10:27 PM, Peter Geoghegan <p...@bowt.ie> wrote: > On Tue, Jul 3, 2018 at 4:34 PM, Srinivas Karthik V > <skarthikv.i...@gmail.com> wrote: > > @Peter: I was indexing the primary key of all the tables in tpc-ds. Some > of > > the fact tables has multiple columns as part of the primary key. Also, > most > > of them are numeric type. > > Please see my mail to -hackers on suffix truncation: > https://postgr.es/m/CAH2-Wzn5XbCzk6u0GL+uPnCp1tbrp2pJHJ=3bYT4yQ0_ > zzh...@mail.gmail.com > > Perhaps this is related in some way, since in both cases we're talking > about a composite index on varlena-type columns, where the types have > expensive comparisons. > > -- > Peter Geoghegan >