Answer the question
In order to leave comments, you need to log in
How to speed up writing array to sqlite db on unity?
Hello, the task is to fill the database with data from the array, there are 30.000+ elements in the array, and it takes longer than 7 minutes, to measure, it takes 5:15 minutes to loop 50k requests, and this is on a PC (target platform is android), in general, this Is it normal or am I doing something wrong?
public static void ExecuteQueryWithoutAnswer(string query)
{
OpenConnection();
Debug.Log("001");
for (int i = 0; i < 50000; i++)
{
query = "insert into Main (Name, LongCode, ShortCode, Price) values (1,1,1,1)";
}
command.CommandText = query;
command.ExecuteNonQuery();
}
Debug.Log("002");
CloseConnection();
}
using(SqliteTransaction transaction = connection.BeginTransaction())
{
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question