23.04.2015, 20:16
A thousand rows is nothing. Even SQLite should easily handle a couple hundred thousand rows. But what you're doing is just a terrible way to do it. Send one query with Limit 1000 instead of 1000 separate queries. Then use a while loop to process the result set (because there may be less than 1000 rows).