a suggestion to accelerate SQLite Insert!

Hi everyone,

I have a lua table. 

This table include over 100.000 record and i am inserting this data in the SQLite table.

I am fetching data with For

Like:

[lua]

local j = table.getn(Data)

for i = 1, j do
local tablefill =“INSERT INTO DATA VALUES (NULL,” …Data[i].item … “,” … Data[i].Price … “)”
db:exec( tablefill )
end[/lua]

It takes about 10 minutes.

Does anyone have an idea to speed up?

anything instead of for fetching?

Thanks in advice…

Hi there,

See this post for the solution: http://forums.coronalabs.com/topic/38491-efficiency-question/.

  • Andrew

thank you so much Andrew

10 minutes turn the 30 sec with 2 line codes 

its like magic  :D 

Hi there,

See this post for the solution: http://forums.coronalabs.com/topic/38491-efficiency-question/.

  • Andrew

thank you so much Andrew

10 minutes turn the 30 sec with 2 line codes 

its like magic  :D