本文介绍了新闻网站包含不同的部分,如TOP NEWS,BREAKING NEWS,LOCAL NEWS,MOVIE等。所有这些部分都加载了数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新闻网站,其中包含不同的部分,如热门新闻,爆炸性新闻,本地新闻,电影等。所有这些部分都是在页面加载时通过逐个串行执行许多SQL查询来加载数据。每个部分通过执行相应的sql查询从不同的表中获取数据;所以他们都是连续的形式。但是通过使用这种方法,我的网站加载时间非常长,以便完成所有这些查询。是否有任何方法可以并行执行所有这些查询并使用一次并行数据填充网站部分。所以在一个执行周期时间我需要完成整个过程而不是等待所有的串行执行周期。

I have a News website which contains different sections like TOP NEWS,BREAKING NEWS, LOCAL NEWS, MOVIE etc. All this sections are loaded with data at the time of page loading by a serial execution of many sql queries one by one. Each section get data from different tables by executing corresponding sql query; so they all in serial form. But by using this approach my website loading time is very high in order to complete all this queries. Is any way to execute all this queries parallel and fill website section with data parallel at a time. so that by a single execution cycle time I need to complete the process instead to wait all the serial execution cycles.

推荐答案


这篇关于新闻网站包含不同的部分,如TOP NEWS,BREAKING NEWS,LOCAL NEWS,MOVIE等。所有这些部分都加载了数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 15:42