Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

18 ms

Page Size

200

Current Page

13 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 13 Results Showing 2401 - 2600 of 24441

ID Name Category Price Stock Rating Reviews SKU
2697 Deluxe Clothing Product Lite Clothing $909.31 149 4.2 265 SKU-002697
2698 Mega Automotive Product XL Automotive $935.79 328 3.6 427 SKU-002698
2699 Mega Books Product Mini Books $182.35 211 3.9 959 SKU-002699
2700 Economy Automotive Product 2024 Automotive $738.89 395 4.2 734 SKU-002700
2701 Premium Sports & Outdoors Product Lite Sports & Outdoors $670.46 437 3.2 830 SKU-002701
2702 Pro Clothing Product Special Edition Clothing $164.24 452 2.2 588 SKU-002702
2703 Economy Electronics Product Max Electronics $111.19 274 4.7 75 SKU-002703
2704 Deluxe Office Supplies Product Lite Office Supplies $927.24 411 2.5 110 SKU-002704
2705 Premium Clothing Product Pro Clothing $443.71 198 4.2 319 SKU-002705
2707 Premium Clothing Product Pro Clothing $419.38 189 1.5 477 SKU-002707
2708 Elite Home & Garden Product Advanced Home & Garden $332.37 90 3.3 919 SKU-002708
2709 Economy Sports & Outdoors Product Mini Sports & Outdoors $453.52 418 4.9 189 SKU-002709
2710 Professional Books Product Classic Books $13.36 311 2.7 267 SKU-002710
2711 Super Toys & Games Product Max Toys & Games $536.21 497 2.8 594 SKU-002711
2712 Premium Electronics Product Classic Electronics $762.49 417 1.4 111 SKU-002712
2713 Standard Office Supplies Product Plus Office Supplies $509.81 446 2.6 857 SKU-002713
2714 Professional Office Supplies Product Pro Office Supplies $667.54 55 1.2 140 SKU-002714
2715 Ultra Electronics Product Max Electronics $857.96 431 1.4 97 SKU-002715
2716 Ultra Sports & Outdoors Product Lite Sports & Outdoors $243.69 126 1.2 154 SKU-002716
2717 Premium Automotive Product Plus Automotive $639.81 455 3.7 322 SKU-002717
2718 Ultra Office Supplies Product 2024 Office Supplies $787.26 231 2.6 93 SKU-002718
2719 Premium Books Product Special Edition Books $888.31 381 4.9 941 SKU-002719
2720 Professional Toys & Games Product Lite Toys & Games $20.51 222 2.0 306 SKU-002720
2721 Elite Books Product Classic Books $183.98 453 3.4 321 SKU-002721
2722 Professional Office Supplies Product Advanced Office Supplies $551.05 272 1.2 435 SKU-002722
2723 Elite Toys & Games Product Special Edition Toys & Games $564.50 248 2.4 41 SKU-002723
2724 Deluxe Home & Garden Product Advanced Home & Garden $224.35 476 2.3 127 SKU-002724
2725 Premium Automotive Product Classic Automotive $938.63 485 3.8 787 SKU-002725
2726 Super Food & Grocery Product Pro Food & Grocery $956.39 145 4.8 756 SKU-002726
2727 Standard Office Supplies Product Max Office Supplies $611.27 287 3.6 669 SKU-002727
2728 Standard Electronics Product Max Electronics $106.51 230 3.9 639 SKU-002728
2729 Professional Toys & Games Product Special Edition Toys & Games $181.65 341 3.7 399 SKU-002729
2731 Professional Office Supplies Product Pro Office Supplies $688.07 396 3.7 460 SKU-002731
2732 Professional Automotive Product Plus Automotive $57.74 150 3.2 402 SKU-002732
2733 Pro Books Product Mini Books $989.06 16 4.5 565 SKU-002733
2734 Professional Office Supplies Product Advanced Office Supplies $646.84 311 2.6 947 SKU-002734
2735 Pro Toys & Games Product 2024 Toys & Games $825.35 10 1.8 776 SKU-002735
2736 Standard Clothing Product Mini Clothing $149.28 433 4.9 814 SKU-002736
2738 Ultra Office Supplies Product Plus Office Supplies $462.34 340 2.5 755 SKU-002738
2740 Economy Toys & Games Product Max Toys & Games $378.11 449 2.5 343 SKU-002740
2741 Pro Office Supplies Product Mini Office Supplies $813.81 222 3.2 783 SKU-002741
2742 Ultra Toys & Games Product Lite Toys & Games $948.50 477 3.5 326 SKU-002742
2743 Economy Office Supplies Product Mini Office Supplies $635.16 248 3.0 378 SKU-002743
2744 Elite Food & Grocery Product Plus Food & Grocery $954.28 284 1.7 653 SKU-002744
2745 Ultra Sports & Outdoors Product Pro Sports & Outdoors $808.50 102 1.5 774 SKU-002745
2746 Deluxe Electronics Product Lite Electronics $358.60 368 4.1 47 SKU-002746
2747 Mega Automotive Product Max Automotive $999.12 161 3.7 858 SKU-002747
2748 Pro Toys & Games Product Pro Toys & Games $248.21 204 4.4 993 SKU-002748
2749 Professional Sports & Outdoors Product Pro Sports & Outdoors $747.46 234 3.9 129 SKU-002749
2750 Mega Health & Beauty Product 2024 Health & Beauty $519.82 2 3.6 100 SKU-002750
2751 Standard Clothing Product Advanced Clothing $348.89 418 2.4 185 SKU-002751
2752 Elite Electronics Product Lite Electronics $766.08 339 2.6 699 SKU-002752
2753 Super Clothing Product Plus Clothing $580.87 64 4.2 573 SKU-002753
2754 Deluxe Office Supplies Product Advanced Office Supplies $881.28 392 2.1 75 SKU-002754
2755 Elite Sports & Outdoors Product Max Sports & Outdoors $188.38 82 1.4 550 SKU-002755
2756 Elite Home & Garden Product 2024 Home & Garden $997.53 47 1.7 253 SKU-002756
2757 Standard Sports & Outdoors Product Lite Sports & Outdoors $561.45 401 1.9 307 SKU-002757
2758 Super Books Product 2024 Books $929.16 9 2.5 282 SKU-002758
2759 Professional Automotive Product Advanced Automotive $133.27 334 3.6 745 SKU-002759
2760 Deluxe Books Product Advanced Books $947.48 191 1.2 795 SKU-002760
2761 Pro Clothing Product 2024 Clothing $566.63 490 3.3 87 SKU-002761
2762 Premium Electronics Product Plus Electronics $768.86 418 3.2 201 SKU-002762
2763 Professional Automotive Product XL Automotive $339.61 239 3.5 78 SKU-002763
2764 Pro Office Supplies Product Lite Office Supplies $589.47 462 1.8 860 SKU-002764
2765 Ultra Health & Beauty Product XL Health & Beauty $217.55 458 2.1 191 SKU-002765
2767 Pro Health & Beauty Product Classic Health & Beauty $832.24 53 4.4 652 SKU-002767
2768 Premium Health & Beauty Product Lite Health & Beauty $599.85 110 1.3 808 SKU-002768
2769 Elite Health & Beauty Product 2024 Health & Beauty $644.65 95 3.0 779 SKU-002769
2770 Deluxe Food & Grocery Product Special Edition Food & Grocery $567.99 216 1.5 589 SKU-002770
2771 Standard Home & Garden Product Classic Home & Garden $485.96 31 2.4 920 SKU-002771
2773 Elite Home & Garden Product XL Home & Garden $448.95 276 3.2 944 SKU-002773
2774 Premium Toys & Games Product Max Toys & Games $611.87 165 3.8 977 SKU-002774
2775 Mega Toys & Games Product Advanced Toys & Games $157.72 310 1.3 487 SKU-002775
2777 Ultra Sports & Outdoors Product Classic Sports & Outdoors $696.08 33 2.0 278 SKU-002777
2778 Premium Office Supplies Product XL Office Supplies $75.94 171 3.5 905 SKU-002778
2779 Professional Health & Beauty Product 2024 Health & Beauty $237.56 471 1.9 616 SKU-002779
2780 Economy Home & Garden Product Special Edition Home & Garden $884.63 185 4.5 898 SKU-002780
2781 Ultra Sports & Outdoors Product Advanced Sports & Outdoors $413.04 468 3.2 445 SKU-002781
2782 Economy Toys & Games Product Classic Toys & Games $404.35 425 2.2 656 SKU-002782
2783 Elite Food & Grocery Product Classic Food & Grocery $392.80 188 4.8 185 SKU-002783
2784 Economy Toys & Games Product Lite Toys & Games $479.34 254 2.0 112 SKU-002784
2786 Pro Automotive Product XL Automotive $425.26 216 2.0 372 SKU-002786
2787 Professional Office Supplies Product Max Office Supplies $332.33 339 3.4 47 SKU-002787
2788 Economy Sports & Outdoors Product Classic Sports & Outdoors $554.87 365 3.7 872 SKU-002788
2789 Elite Home & Garden Product Advanced Home & Garden $213.56 150 3.6 714 SKU-002789
2790 Mega Electronics Product Plus Electronics $782.26 376 2.5 463 SKU-002790
2791 Ultra Home & Garden Product Mini Home & Garden $93.98 297 3.8 831 SKU-002791
2793 Ultra Clothing Product XL Clothing $107.60 226 3.9 444 SKU-002793
2794 Professional Food & Grocery Product Plus Food & Grocery $504.16 32 4.2 540 SKU-002794
2795 Mega Health & Beauty Product Classic Health & Beauty $277.44 206 4.3 726 SKU-002795
2796 Professional Food & Grocery Product Plus Food & Grocery $586.76 463 2.3 29 SKU-002796
2797 Deluxe Office Supplies Product Max Office Supplies $33.31 186 5.0 160 SKU-002797
2799 Economy Automotive Product Max Automotive $101.67 437 3.6 836 SKU-002799
2800 Super Home & Garden Product Classic Home & Garden $294.14 346 3.7 858 SKU-002800
2801 Elite Home & Garden Product Mini Home & Garden $438.24 380 1.6 305 SKU-002801
2802 Mega Automotive Product Lite Automotive $106.95 253 1.1 401 SKU-002802
2803 Premium Clothing Product Special Edition Clothing $901.35 480 4.2 517 SKU-002803
2804 Premium Automotive Product XL Automotive $845.96 113 1.3 880 SKU-002804
2805 Pro Sports & Outdoors Product Special Edition Sports & Outdoors $271.47 211 2.8 479 SKU-002805
2806 Standard Health & Beauty Product Advanced Health & Beauty $43.22 173 4.9 158 SKU-002806
2807 Deluxe Office Supplies Product Mini Office Supplies $212.32 344 4.2 493 SKU-002807
2808 Economy Office Supplies Product Plus Office Supplies $802.97 111 3.0 703 SKU-002808
2810 Economy Books Product Mini Books $130.14 159 1.5 550 SKU-002810
2812 Super Office Supplies Product Pro Office Supplies $616.40 261 1.5 270 SKU-002812
2813 Economy Clothing Product 2024 Clothing $471.16 496 4.3 55 SKU-002813
2814 Pro Toys & Games Product Plus Toys & Games $638.36 213 3.8 344 SKU-002814
2815 Standard Toys & Games Product XL Toys & Games $568.53 79 3.4 835 SKU-002815
2816 Mega Books Product Classic Books $529.66 478 2.5 54 SKU-002816
2817 Ultra Health & Beauty Product XL Health & Beauty $794.16 39 3.8 985 SKU-002817
2818 Professional Automotive Product XL Automotive $718.78 79 4.0 20 SKU-002818
2819 Super Electronics Product 2024 Electronics $450.00 383 1.8 696 SKU-002819
2820 Mega Home & Garden Product Pro Home & Garden $404.15 434 1.6 768 SKU-002820
2821 Ultra Health & Beauty Product Plus Health & Beauty $442.91 52 2.1 294 SKU-002821
2822 Premium Office Supplies Product Classic Office Supplies $97.27 230 2.0 52 SKU-002822
2823 Premium Office Supplies Product Plus Office Supplies $474.72 373 3.7 208 SKU-002823
2824 Mega Sports & Outdoors Product Pro Sports & Outdoors $616.65 0 3.2 559 SKU-002824
2826 Professional Health & Beauty Product Plus Health & Beauty $74.48 460 3.0 521 SKU-002826
2827 Professional Toys & Games Product Special Edition Toys & Games $254.31 218 3.1 580 SKU-002827
2828 Professional Food & Grocery Product Plus Food & Grocery $789.72 75 3.0 425 SKU-002828
2830 Ultra Home & Garden Product Lite Home & Garden $541.82 378 1.5 753 SKU-002830
2831 Pro Home & Garden Product Advanced Home & Garden $714.95 349 1.8 34 SKU-002831
2832 Ultra Food & Grocery Product XL Food & Grocery $809.99 44 4.2 300 SKU-002832
2833 Ultra Toys & Games Product Pro Toys & Games $658.19 212 2.8 930 SKU-002833
2835 Mega Health & Beauty Product Max Health & Beauty $255.77 9 4.5 978 SKU-002835
2836 Elite Automotive Product Max Automotive $645.96 449 2.7 450 SKU-002836
2837 Elite Sports & Outdoors Product 2024 Sports & Outdoors $779.23 363 5.0 56 SKU-002837
2838 Economy Clothing Product Advanced Clothing $368.50 455 1.6 244 SKU-002838
2839 Ultra Toys & Games Product Pro Toys & Games $193.58 309 1.9 832 SKU-002839
2840 Economy Health & Beauty Product Advanced Health & Beauty $719.00 384 4.6 805 SKU-002840
2841 Professional Food & Grocery Product Advanced Food & Grocery $11.07 142 3.6 339 SKU-002841
2842 Mega Home & Garden Product Max Home & Garden $883.59 320 3.6 794 SKU-002842
2843 Professional Health & Beauty Product Lite Health & Beauty $715.33 462 1.4 569 SKU-002843
2844 Premium Food & Grocery Product Max Food & Grocery $905.60 388 1.2 907 SKU-002844
2845 Super Books Product Plus Books $13.99 354 4.4 211 SKU-002845
2846 Deluxe Electronics Product Plus Electronics $690.37 127 4.8 860 SKU-002846
2847 Professional Toys & Games Product Lite Toys & Games $621.74 264 3.1 25 SKU-002847
2848 Economy Clothing Product Advanced Clothing $318.31 412 3.5 267 SKU-002848
2849 Elite Automotive Product 2024 Automotive $470.39 398 2.5 184 SKU-002849
2850 Pro Toys & Games Product Pro Toys & Games $195.91 338 2.9 573 SKU-002850
2851 Ultra Automotive Product Plus Automotive $537.32 367 3.9 451 SKU-002851
2852 Deluxe Electronics Product Plus Electronics $804.00 468 2.3 275 SKU-002852
2853 Premium Sports & Outdoors Product 2024 Sports & Outdoors $319.84 34 4.1 111 SKU-002853
2854 Deluxe Home & Garden Product Plus Home & Garden $688.93 385 1.1 978 SKU-002854
2856 Pro Health & Beauty Product XL Health & Beauty $201.92 384 2.4 807 SKU-002856
2857 Ultra Electronics Product Special Edition Electronics $272.53 321 2.2 428 SKU-002857
2858 Economy Electronics Product Lite Electronics $121.71 49 1.8 763 SKU-002858
2859 Deluxe Toys & Games Product Special Edition Toys & Games $442.24 59 2.7 685 SKU-002859
2860 Standard Toys & Games Product 2024 Toys & Games $969.10 369 2.3 638 SKU-002860
2861 Professional Electronics Product Plus Electronics $694.82 392 4.4 948 SKU-002861
2862 Economy Home & Garden Product Plus Home & Garden $432.78 377 3.6 146 SKU-002862
2864 Mega Clothing Product Plus Clothing $745.02 39 3.1 520 SKU-002864
2865 Elite Electronics Product XL Electronics $515.39 441 3.2 989 SKU-002865
2866 Elite Sports & Outdoors Product Plus Sports & Outdoors $978.30 434 4.7 802 SKU-002866
2867 Deluxe Clothing Product Special Edition Clothing $381.07 436 3.3 461 SKU-002867
2869 Ultra Sports & Outdoors Product Plus Sports & Outdoors $274.78 353 3.9 782 SKU-002869
2870 Ultra Books Product Pro Books $726.02 252 1.7 835 SKU-002870
2871 Deluxe Office Supplies Product Plus Office Supplies $509.00 192 1.1 943 SKU-002871
2873 Elite Books Product Pro Books $653.00 215 4.7 573 SKU-002873
2874 Premium Electronics Product Classic Electronics $209.83 63 4.4 538 SKU-002874
2875 Premium Office Supplies Product Mini Office Supplies $25.65 408 3.2 9 SKU-002875
2876 Mega Books Product Mini Books $929.75 336 3.9 601 SKU-002876
2877 Pro Automotive Product XL Automotive $726.90 161 3.7 216 SKU-002877
2878 Standard Office Supplies Product 2024 Office Supplies $941.88 100 2.2 296 SKU-002878
2879 Economy Toys & Games Product Lite Toys & Games $980.96 307 1.2 438 SKU-002879
2880 Deluxe Books Product Lite Books $215.29 283 3.7 788 SKU-002880
2881 Super Office Supplies Product Pro Office Supplies $165.24 225 2.0 323 SKU-002881
2882 Pro Books Product Classic Books $977.73 375 1.1 192 SKU-002882
2883 Super Electronics Product Lite Electronics $521.61 221 4.0 5 SKU-002883
2884 Pro Office Supplies Product Advanced Office Supplies $600.09 40 3.9 860 SKU-002884
2885 Premium Books Product 2024 Books $533.95 313 1.9 166 SKU-002885
2886 Ultra Sports & Outdoors Product Special Edition Sports & Outdoors $578.76 303 1.5 282 SKU-002886
2887 Mega Automotive Product Pro Automotive $876.32 446 4.9 778 SKU-002887
2888 Ultra Office Supplies Product Pro Office Supplies $527.09 74 3.2 239 SKU-002888
2889 Deluxe Food & Grocery Product Special Edition Food & Grocery $423.11 437 4.6 156 SKU-002889
2890 Economy Health & Beauty Product Mini Health & Beauty $748.88 163 3.4 422 SKU-002890
2891 Standard Books Product Pro Books $690.89 303 3.9 296 SKU-002891
2893 Deluxe Books Product 2024 Books $523.26 314 3.9 316 SKU-002893
2894 Pro Books Product Special Edition Books $651.97 118 3.4 3 SKU-002894
2895 Super Automotive Product Lite Automotive $463.73 111 4.1 277 SKU-002895
2896 Economy Food & Grocery Product Mini Food & Grocery $488.68 357 2.7 533 SKU-002896
2897 Professional Health & Beauty Product Classic Health & Beauty $438.19 426 3.9 114 SKU-002897
2898 Super Office Supplies Product Pro Office Supplies $954.52 16 2.7 54 SKU-002898
2899 Economy Clothing Product Lite Clothing $427.02 104 4.5 311 SKU-002899
2900 Pro Books Product Plus Books $851.84 215 3.8 124 SKU-002900
2901 Elite Toys & Games Product Mini Toys & Games $428.15 367 3.7 376 SKU-002901
2902 Super Automotive Product Plus Automotive $97.90 30 1.5 965 SKU-002902
2903 Mega Toys & Games Product Pro Toys & Games $538.30 345 4.6 837 SKU-002903
2904 Elite Office Supplies Product XL Office Supplies $739.85 469 3.2 275 SKU-002904
2905 Standard Home & Garden Product XL Home & Garden $502.82 30 3.1 19 SKU-002905
2906 Deluxe Automotive Product Special Edition Automotive $142.08 327 2.1 765 SKU-002906
2907 Mega Books Product 2024 Books $748.01 250 2.3 228 SKU-002907
2908 Super Health & Beauty Product 2024 Health & Beauty $320.51 167 2.1 218 SKU-002908
2909 Professional Books Product Mini Books $115.32 23 3.5 736 SKU-002909
2910 Pro Home & Garden Product Pro Home & Garden $722.52 166 1.0 49 SKU-002910
2911 Mega Food & Grocery Product Lite Food & Grocery $658.08 201 3.7 408 SKU-002911
2912 Mega Toys & Games Product XL Toys & Games $480.47 381 4.7 679 SKU-002912
2913 Deluxe Office Supplies Product Mini Office Supplies $792.32 128 3.9 580 SKU-002913
2914 Elite Home & Garden Product Pro Home & Garden $333.55 460 2.0 359 SKU-002914
2915 Super Sports & Outdoors Product Lite Sports & Outdoors $818.68 162 2.6 979 SKU-002915
2916 Standard Health & Beauty Product Advanced Health & Beauty $83.29 409 2.7 977 SKU-002916
Implementation Code
// Efficient pagination with Skip and Take
public async Task<PaginatedResult<DemoProduct>> GetPaginatedProductsAsync(int page, int pageSize)
{
    // Get total count (cached if possible)
    var totalCount = await _context.DemoProducts.CountAsync(p => p.IsActive);
    
    // Get page of results
    var items = await _context.DemoProducts
        .Where(p => p.IsActive)
        .OrderBy(p => p.Id) // Important: Must have ORDER BY for consistent paging
        .Skip((page - 1) * pageSize) // OFFSET in SQL
        .Take(pageSize) // FETCH NEXT in SQL
        .AsNoTracking() // No tracking needed for read-only
        .ToListAsync();

    return new PaginatedResult<DemoProduct>
    {
        Items = items,
        TotalCount = totalCount,
        Page = page,
        PageSize = pageSize
    };
}
Pagination Best Practices
  • Always use OrderBy: Skip/Take require stable sorting for consistent results
  • Use AsNoTracking(): Pagination queries are typically read-only
  • Consider caching: Cache total count if dataset changes infrequently
  • Limit max page size: Prevent users from requesting too many records at once
  • Use indexed columns: Ensure ORDER BY columns are indexed for performance