title: PostgreSQL: is CREATE INDEX faster for new indexes if a clustered index already exists?
body: <p>My question is about performance during the data loading process. I need to create four indexes on a 1.6 billion rows table and I was wondering which one of the following is faster:</p>
  
  <ol>
  <li><p>creating an index, clustering it and then creating the other indexes:</p>
  
  <pre><code>CREATE INDEX i_col1 ON db.tbl USING btree (col1);
  CLUSTER db.tbl USING i_col1;
  CREATE INDEX i_col2 ON db.tbl USING btree (col2);
  CREATE INDEX i_col3 ON db.tbl USING btree (col3);
  CREATE INDEX i_col4 ON db.tbl USING btree (col4);
  </code></pre></li>
  <li><p>creating all the indexes and then clustering the same first index:</p>
  
  <pre><code>CREATE INDEX i_col1 ON db.tbl USING btree (col1);
  CREATE INDEX i_col2 ON db.tbl USING btree (col2);
  CREATE INDEX i_col3 ON db.tbl USING btree (col3);
  CREATE INDEX i_col4 ON db.tbl USING btree (col4);
  CLUSTER db.tbl USING i_col1;
  </code></pre></li>
  </ol>