Good idea.
However, ‘other data’ is saved into the internal repository(PostgreSQL) and it should join together, so using SQLite could be burden.
Just in case, paste my code for the step #2.
With this loop, 5000 rows are inserted into INTERNAL_REP and it takes 13 seconds. That is the problem.
logging("TimeCheck : Before PostgreSQLPreparedStatement")
Dim ps As PostgreSQLPreparedStatement
ps = mPostgreSQLDB.Prepare("INSERT INTO INTERNAL_REP VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12)")
While Not rs.EOF
ps.Bind(0, rs.IdxField(1).StringValue)
ps.Bind(1, rs.IdxField(2).StringValue)
ps.Bind(2, rs.IdxField(3).StringValue)
ps.Bind(3, rs.IdxField(4).StringValue)
ps.Bind(4, rs.IdxField(5).StringValue)
ps.Bind(5, rs.IdxField(6).StringValue)
ps.Bind(6, rs.IdxField(7).StringValue)
ps.Bind(7, rs.IdxField(8).IntegerValue)
ps.Bind(8, rs.IdxField(9).IntegerValue)
ps.Bind(9, rs.IdxField(10).IntegerValue)
ps.Bind(10, rs.IdxField(11).IntegerValue)
ps.Bind(11, rs.IdxField(12).IntegerValue)
ps.SQLExecute(rs.IdxField(1).StringValue,rs.IdxField(2).StringValue,rs.IdxField(3).StringValue,rs.IdxField(4).StringValue,rs.IdxField(5).StringValue,rs.IdxField(6).StringValue,rs.IdxField(7).StringValue,rs.IdxField(8).IntegerValue,rs.IdxField(9).IntegerValue,rs.IdxField(10).IntegerValue,rs.IdxField(11).IntegerValue,rs.IdxField(12).IntegerValue)
mPostgreSQLDB.Commit
rs.MoveNext
Wend
logging("TimeCheck : After PostgreSQLPreparedStatement")