Create indexes after data load in parallel_prepare

Creating indexes after the data has been loaded is much faster.
This commit is contained in:
Jeremy Cole
2016-08-23 13:20:35 -07:00
parent 00eb404a86
commit 9e4a9d4cf5

View File

@ -59,8 +59,6 @@ pad CHAR(60) DEFAULT '' NOT NULL,
db_query(query)
db_query("CREATE INDEX k_" .. i .. " on sbtest" .. i .. "(k)")
print("Inserting " .. oltp_table_size .. " records into 'sbtest" .. i .. "'")
if (oltp_auto_inc) then
@ -89,6 +87,8 @@ pad CHAR(60) DEFAULT '' NOT NULL,
db_bulk_insert_done()
print("Creating secondary indexes on 'sbtest" .. i .. "'...")
db_query("CREATE INDEX k_" .. i .. " on sbtest" .. i .. "(k)")
end