-2

I have been working on device with android 4.4.2 with my database for some time, and I've noticed that when the same database were transfered to device with similar parameters but with Android 5.0.2, database work really sloooow. What could be the reason for that?

blackadd3r
  • 13
  • 6
  • 1
    Use **transactions**: http://stackoverflow.com/a/28188228/2649012. You should also use **indexes**: http://www.tutorialspoint.com/sqlite/sqlite_indexes.htm – Phantômaxx Aug 31 '15 at 09:23

1 Answers1

1

Android 5 uses SQLite 3.8. With that version they introduced some big changes. One point that I remeber is that SQLite now relies more on statistics.

You can try to update your DB statistics with ANALYZE and see if that helps.

Also you can use EXPLAIN QUERY PLAN to analyze your queries and find a hint whats goign on.

fab
  • 1,839
  • 15
  • 21