开发者

More efficient to have one query loadng a lot of data, or multiple queries loading smaller chunks?

开发者 https://www.devze.com 2023-04-05 08:42 出处:网络
I\'m planning on building a page with multiple \"tabs\" (up to 4) within it, and up to 25 \"rows\" per tab. Would it be more efficient to load all (up to) 4 tabs worth of data at once, or would it be

I'm planning on building a page with multiple "tabs" (up to 4) within it, and up to 25 "rows" per tab. Would it be more efficient to load all (up to) 4 tabs worth of data at once, or would it be better to load the first tabs data, then if the second is clicked to ajax in that set? Or would it re开发者_如何学运维ally just depend on the query?

Thanks


It depends on the query.

Google paginates search results because a single query might bring back millions of hits, ranked by likelihood of usefulness.

If the queries are small, the answer doesn't matter much. The only thing users might notice is network latency.

0

精彩评论

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

关注公众号