1. A computer-implemented method for creating an index on a database table, comprising: extracting index key columns from data rows of the database table to build a set of index rows, wherein the index on the database table is defined by a plurality of index key columns including a first index key column and a second index key column; generating partition boundary values to divide up the index rows into range-partitioned sets, wherein the index rows are sorted based on values of the index key columns; performing a repartitioning scan on the index rows of the database table, using a plurality of worker threads executing in parallel to build sub-indexes, wherein each range-partitioned set of index rows are assigned to a worker thread in the plurality of worker threads; and merging the sub-indexes from the plurality of work threads to generate the index for the database table.