Closed sandeepgahlawat closed 8 years ago
Use subscribeOn()
instead of observeOn()
.
Regarding performance: create one single raw sql inserts with all the data in one single SQL statement: INSERT INTO Foo (1,2,3) , (4,5,6) , (7, 8 ,9)
(so specify each item to insert as a tupel)
thank you for such a quick reply
One last thing, does the library has any built in function for implementing the text search on a particular column or do i have to create a virtual table using FTS3 or FTS4 Sqlite extensions and the use the MATCH keyword in the query for it.
No, there is no such functionality provided. You have do to that by your own. You can write raw sql queries to use MATCH keyword.
Hi,
I have more than 800 rows to be inserted and while doing so it blocks the UI thread. Is there a way to run the sqlite insert and update queries on background thread.
P.S i tried using the ObserveOn(Schedulers.computations()) like customerDao.insert(Integer.parseInt(idEdit.getText().toString()), firstnameEdit.getText().toString(), lastnameEdit.getText().toString(), adultCheckBox.isChecked()).ObserveOn(Schedulers.computations()).subscribe(insertSubscription); but nothing happened.