Current location - Loan Platform Complete Network - Big data management - How to optimize the SQL statement of the system of big data and high concurrency to improve efficiency
How to optimize the SQL statement of the system of big data and high concurrency to improve efficiency
1, HTML static

The most efficient and least consumed is the pure static html page, so as far as possible to make the pages on the site using static pages to achieve, this is the simplest method is actually the most effective method. But for a large number of content and frequently updated website, can not all manually go from one to another to achieve, so the emergence of a common information dissemination system CMS, such as often access to the various portals site's news channel, and even their other channels, are through the information dissemination system to manage and achieve, information dissemination system can achieve the simplest information entry automatically generate static pages, but also with channel management, Permission management, automatic capture and other functions, for a large-scale website, has a set of efficient, manageable CMS is essential.

2, picture server separation

For Web servers, whether Apache, IIS or other containers, the picture is the most resource-consuming, so it is necessary to separate the picture from the page, which is basically a large site will be used by the strategy, they have an independent picture server, or even many picture servers. Such an architecture can reduce the pressure on the server system to provide page access requests, and can ensure that the system will not be crashed because of image problems. On the application server and image server, different configuration optimization can be carried out, for example, apache in the configuration of ContentType can be as little as possible to support, as little as possible LoadModule, to ensure that a higher system consumption and implementation efficiency. This realization is relatively easy to realize, if the server cluster is more convenient to operate, if it is an independent server, novice may appear to upload pictures only in the server local situation, you can set up a server in the IIS using the network path to achieve the picture server, that is, do not have to change the program, but also to improve performance, but for the server itself, the IO processing performance is not any change. change.

3, database clustering and library table hash

Large sites have complex applications, these applications must use the database, then in the face of a large number of visits, the bottleneck of the database will soon be able to show, then a database will soon not be able to meet the application, so the need to use the database clustering or library table hash.

4, caching

The term caching technology have been in contact with a lot of places to use the cache. Web architecture and web development in the cache is also very important. Architecture of the cache, more familiar with Apache people can know Apache provides its own cache module, you can also use the additional Squid module for caching, both ways can effectively improve the Apache access responsiveness.

Website program development aspects of the cache, Linux provides Memory Cache is commonly used caching interface, can be used in web development, such as the development of Java can be called MemoryCache on some of the data caching and communication **** enjoy, some of the large communities use such a structure. In addition, when using web language development, various languages basically have their own caching modules and methods, PHP has Pear's Cache module, Java is more, .net is not very familiar with, I believe that there must also be.