开发者

Is it possible to save the result of a DB query to be doled out over multiple HTTPRequests?

开发者 https://www.devze.com 2023-01-26 04:03 出处:网络
I\'m trying to think up a way to execute a MySQL query, get 50 rows back, inform the requester that it has 50 rows to get, and then send 10 rows.But the server can\'t say \"Take this next set of data\

I'm trying to think up a way to execute a MySQL query, get 50 rows back, inform the requester that it has 50 rows to get, and then send 10 rows. But the server can't say "Take this next set of data" (can it?). But it can say "there is more data" and the user can send ANOTHER request. But I dont' want another SQL query to be performed, I just 开发者_开发问答want the results of the first query to be cahced somewhere and then the user knows where it is adn says "I need the next 10 entries from memory @ __"

The end goal is I want to be able to have an iPhone app that can request large amounts of information but only ever be waiting for ONE of those pieces. This way the user can interact with what has been returned thus far instead of waiting 30 seconds and then finally being able to do things.


Store the query results in memcached. That way you don't have to do multiple sql requests.

0

精彩评论

暂无评论...
验证码 换一张
取 消