Paging design guidelines for asp.net and sqlserver 2005

I am relatively new to programming. My work mainly revolves around data and analysis. I want to create a simple asp.net page that shows a huge piece of data from a database. There may be millions of rows of data that are used for various types of analysis / search / filtering, etc.

Should I write swap logic on the front or on the back (in this case, SQL Server 2005)?

What would be the best practice? Your suggestions / links to resources in this direction are welcome.

+3
source share
3 answers

You may be interested in this ... Paging a large result set in asp.net

0
source

. Linq To SQL - stp.

:

CREATE PROCEDURE [dbo].[stp_PagingSample]
(
    @page int,
    @pagesize int
)
AS

WITH Numbered AS
(
    SELECT *, ROW_NUMBER() OVER (ORDER BY ID) AS 'RowNumber'
    FROM tbl_YourTable
) 
SELECT * 
FROM Numbered
WHERE RowNumber BETWEEN ((@page - 1) * @pagesize) + 1 AND (@page * @pagesize);

- . , , , stp, ...:)

0

Source: https://habr.com/ru/post/1717569/


All Articles