My application receives a lot of data every milliseconds(name,id,value,.. of a signal from a simulator device). and I should upload this data to MySQL server. First I need to save them in a database and upload them to the server via GSM network. The reason that I save data into the mobile device is that the connection is so slow and the app receives a quite large number of data at a time and cannot upload them at once, also it may encounter disconnection problem. In fact, I just need a temporary storage and I don't want to do any data manipulation in the SQLite. Currently I am writing the data to the simple text file(CSV) and then upload every 20 lines to the server using name/value pairs in Android HttpPost, but what about SQLite? Is it faster to insert data to SQLite and then upload it? Which approach is preferable?
Here is the sample data that I receive from the simulator device:
time,id,name,value 143125738713,id1,name1,8.000077 143125738714,id1,name1,8.000004 143125738714,id1,name1,8.000008 143125738715,id2,name2,0.0 143125738716,id2,name2,0.0