I have an sqlite table containing 1 million records. The rows get inserted and deleted randomly. During start -up of my application, I need to fill the database in my data structures. How can I pick up the rows in chunks of 10000. I dont want to delete the rows from sqlite table in this start up.
I'm not sure if this is what you meant, but if you want to select the first 10000 rows in a table you could go with "SELECT * FROM table LIMIT 10000" and for the following 10000 rows "SELECT * FROM table LIMIT 10000 OFFSET 10000".
I guess it can be done in a loop with variables for limit and offset, and maybe you need to count the rows first to know how much looping is required. I don't know how it handles errors when the offset is maxed.