There are several paging implementation methods: 1. in the foreground program, all records are read locally, and the foreground program moves up and down in the dataset through the cursor. If the data volume is large, the performance is poor and is not recommended. when a front-end program requests a certain page of data, it goes to the database for a query and returns the corresponding records that meet the conditions. This is also a common method; 3. peer
There are several paging implementation methods: 1. in the foreground program, all records are read locally, and the foreground program moves up and down in the dataset through the cursor. If the data volume is large, the performance is poor and is not recommended. when a front-end program requests a certain page of data, it goes to the database for a query and returns the corresponding records that meet the conditions. This is also a common method; 3. peer
There are several paging implementation methods:
1. Read all records locally in the front-end program. The front-end program moves up and down the data set through the cursor. If the data volume is large, the Hong Kong Space has poor performance and is not recommended;
2. When a foreground program requests a certain page of data, the VM performs a query in the database and returns the corresponding records that meet the conditions. This is also a common method;
3. for improvement in method 2, when a page is requested and the previous and subsequent pages are returned, the user does not need to request the database repeatedly when turning pages.
For the implementation, the Hong Kong Server is rented. With the upgrade of the SQL Server version, there are three common methods: TOP, ROW_NUMBER, OFFSET/FETCH NEXT.
Test data:
) Split_pages (ID, Name varchar (100) split_pages (10) split_pages