Paging technology and its application in web page (original)
WEB pages in the pagination of the original technology and its applications: ASP boutiques
Paging Technology and Its Applications in the web page, the preambular paged technology is very broad, the hardware, the computer's system memory uses paging technology, using paging technology to convert the linear address to the actual address. On the software, in order to achieve virtual memory, Windows uses the memory paging technology provided by 386 CPUs, which supports the memory into a "page" unit "in units of 4KB. Today, the Web introduces database technology, and a large number of data processing needs to be used to use paging technology. System memory, virtual memory, and databases are used to use paging technology because they have a common feature, that is, their address or data is linear, need to identify some of them by paging technology. One or an address location. I haven't seen the definition of pagination, but I can know that paging is the address or location used to identify a thing. In the database, a large amount of data processing is output through the web and transmitted to the client, in order to reduce the transmission amount and more accurately find data, it is necessary to use paging technology. The current paging technology has been widely applied to each corner of the Internet, including search engines, BBS, online yellow pages, e-commerce, and other applications with certain amounts of information. Paging techniques have become an indispensable part of Web development. This article is only limited to the web development and database-related paging technology. Paging Technology and Its Application in the web page - (1) The size of the database is currently required to support the database. According to the amount of data (number of records), it can be divided into miniature database (10,000), small database (In 100,000), medium database (1 million), large databases (greater than 1 million) are not equal. An important role of paging technology is to improve the running efficiency of the server (actually the speed). If the paging technology adopted is not possible to improve the efficiency, it is necessary to improve the paging mode. First we need to introduce some common features of the page: View all the items for all eligible data Previous: View the previous page of the page relative to the current database Next: View the last page of the next page of the current database on page: View all the last page of all qualified data Go to the specified page: View all the specified page data statistics and calibration position function statistics Meet the number of records, the number of pages, identifying the current viewed records is the first few to the order, in the first few pages. Several commonly used paging methods 1. The functions of all paging technologies described above, the number of records of such databases is less than the number of records, only the first page, the next page, the next page, the final page flip function, Others may have a total of total record numbers, pages, and such databases are generally 3. There is only the first and next page, or only the previous page and the last page. Such databases should tend to be large, and try to use only SQL statement queries to reduce the execution time of the database, you can add statistics for total record numbers and pages. 4. Only the front N stick meets the conditions, and you can use all floppage functions, the total record number and page number can only be estimated. In general, search engines use this way. The second, three paging methods of the previous page cannot be used to identify the current viewed record is the first few to the order, in the first few pages, it does not seem to comply with the paging definitions described in the original, in fact, paging needs to have a location The logo can complete the paging, that is, in the database, there is a corresponding trackable field. Only they can only identify a node at a time, not reaching any conversion between the pages. The function directly affects the speed of paging, of course, if the database is large, the more obvious and serious affects. Below is a suggestion of various databases: Miniature Data: Due to less data, the speed impact is also minimized, for the convenience of website access, it is recommended to use all functions.
Small Database: It is recommended to adopt a second paging method so that the website will be relatively stable, such as BBS with high access, such as Sina's forum. Medium-sized database: The second or third method can be used. If it is considered to be slow, the third method is recommended. Large Database: If you need to traverse all data, it is recommended to adopt a third way, if you only need to return a part of the data, it is recommended to use the fourth type. Paging Technology and Its Application in the web page - (2) How can I have efficiency of the paging execution? We will complete all the paging functions at one time to complete a paging, no matter how much data, the execution time to complete a paging should not exceed 100 milliseconds, ie 0.1 seconds. If it is always greater than 200 seconds, I think you should change the paging method and reduce the features in some paging. Time is life, and it is true in the program. The WEB paging of the general database is implemented by some scripting statements, including ASP, PHP, and JSP, etc., the execution efficiency of the database directly affects the stability of the system and access to withstand capacity. 20% of code occupies 80% execution time is already a classic word sentence in programming. In practical applications in paging, we should continue to test all kinds of code running, find out how the time bottle in the program will make The program you wrote is more stable and professional. Here is a JScript function that gets the current time, accurate to milliseconds: