Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

35 ms

Page Size

200

Current Page

14 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 14 Results Showing 2601 - 2800 of 24441

ID Name Category Price Stock Rating Reviews SKU
2917 Professional Electronics Product Plus Electronics $331.98 208 4.1 464 SKU-002917
2918 Ultra Electronics Product Classic Electronics $719.84 484 2.4 703 SKU-002918
2919 Ultra Electronics Product Plus Electronics $209.92 23 4.8 655 SKU-002919
2920 Ultra Health & Beauty Product Plus Health & Beauty $660.29 134 4.0 951 SKU-002920
2921 Mega Health & Beauty Product 2024 Health & Beauty $768.38 92 3.2 942 SKU-002921
2922 Economy Books Product Plus Books $753.90 441 1.1 55 SKU-002922
2923 Standard Sports & Outdoors Product Lite Sports & Outdoors $733.57 401 1.1 168 SKU-002923
2924 Super Automotive Product Max Automotive $27.52 154 3.5 639 SKU-002924
2925 Premium Electronics Product Max Electronics $660.83 87 2.9 561 SKU-002925
2926 Elite Electronics Product Classic Electronics $856.88 18 2.9 166 SKU-002926
2927 Ultra Electronics Product Lite Electronics $786.57 495 3.6 816 SKU-002927
2928 Mega Home & Garden Product Lite Home & Garden $601.52 392 4.6 989 SKU-002928
2929 Ultra Health & Beauty Product Plus Health & Beauty $267.81 27 2.9 185 SKU-002929
2931 Elite Sports & Outdoors Product Mini Sports & Outdoors $771.64 142 2.1 46 SKU-002931
2932 Professional Toys & Games Product Classic Toys & Games $671.47 71 1.7 733 SKU-002932
2933 Standard Toys & Games Product Special Edition Toys & Games $937.97 433 2.0 58 SKU-002933
2935 Super Books Product Mini Books $532.36 74 3.9 82 SKU-002935
2936 Premium Toys & Games Product Advanced Toys & Games $353.92 423 4.5 408 SKU-002936
2937 Deluxe Clothing Product Special Edition Clothing $148.88 458 1.9 304 SKU-002937
2938 Pro Home & Garden Product Pro Home & Garden $772.46 395 1.9 20 SKU-002938
2939 Professional Electronics Product Mini Electronics $286.41 44 1.9 864 SKU-002939
2940 Elite Clothing Product Plus Clothing $213.69 264 1.1 675 SKU-002940
2941 Deluxe Home & Garden Product 2024 Home & Garden $951.74 234 1.9 639 SKU-002941
2942 Premium Sports & Outdoors Product Pro Sports & Outdoors $615.66 127 2.8 84 SKU-002942
2944 Ultra Home & Garden Product Mini Home & Garden $302.17 461 4.9 632 SKU-002944
2945 Standard Clothing Product Plus Clothing $878.99 25 1.5 496 SKU-002945
2946 Mega Home & Garden Product XL Home & Garden $37.90 259 2.5 423 SKU-002946
2947 Super Sports & Outdoors Product Mini Sports & Outdoors $748.73 208 1.7 336 SKU-002947
2948 Economy Sports & Outdoors Product Classic Sports & Outdoors $38.58 362 2.5 415 SKU-002948
2949 Professional Food & Grocery Product Plus Food & Grocery $142.80 239 2.0 161 SKU-002949
2950 Economy Toys & Games Product Plus Toys & Games $423.26 247 1.8 350 SKU-002950
2951 Ultra Home & Garden Product Special Edition Home & Garden $299.23 288 4.8 852 SKU-002951
2952 Professional Electronics Product Classic Electronics $427.97 396 2.7 746 SKU-002952
2953 Deluxe Home & Garden Product Advanced Home & Garden $944.18 317 1.7 970 SKU-002953
2954 Economy Books Product Special Edition Books $410.96 255 3.8 901 SKU-002954
2955 Elite Sports & Outdoors Product Plus Sports & Outdoors $19.41 232 3.5 530 SKU-002955
2956 Standard Home & Garden Product Lite Home & Garden $398.35 422 2.6 563 SKU-002956
2957 Mega Toys & Games Product Max Toys & Games $599.31 108 2.6 377 SKU-002957
2958 Professional Home & Garden Product Classic Home & Garden $809.09 241 2.3 374 SKU-002958
2959 Deluxe Health & Beauty Product Mini Health & Beauty $435.94 93 4.8 307 SKU-002959
2960 Standard Electronics Product Special Edition Electronics $955.50 317 2.6 917 SKU-002960
2961 Premium Electronics Product 2024 Electronics $406.47 450 3.5 426 SKU-002961
2962 Pro Office Supplies Product Special Edition Office Supplies $621.32 305 1.0 941 SKU-002962
2963 Economy Office Supplies Product Max Office Supplies $437.32 50 3.0 33 SKU-002963
2964 Mega Home & Garden Product 2024 Home & Garden $528.19 492 4.1 868 SKU-002964
2965 Standard Home & Garden Product Pro Home & Garden $769.76 386 4.9 690 SKU-002965
2966 Standard Automotive Product Pro Automotive $966.42 258 3.3 770 SKU-002966
2967 Premium Electronics Product Mini Electronics $640.40 128 2.1 361 SKU-002967
2968 Ultra Health & Beauty Product 2024 Health & Beauty $824.66 36 1.7 436 SKU-002968
2969 Ultra Food & Grocery Product Mini Food & Grocery $550.63 393 3.3 814 SKU-002969
2970 Mega Electronics Product Mini Electronics $92.62 78 4.6 456 SKU-002970
2971 Deluxe Books Product Classic Books $561.44 164 3.8 573 SKU-002971
2972 Super Food & Grocery Product Pro Food & Grocery $704.51 189 1.9 247 SKU-002972
2973 Economy Clothing Product Mini Clothing $710.09 116 5.0 36 SKU-002973
2974 Pro Health & Beauty Product 2024 Health & Beauty $758.52 144 5.0 420 SKU-002974
2975 Ultra Automotive Product Plus Automotive $738.88 262 4.0 6 SKU-002975
2976 Deluxe Health & Beauty Product XL Health & Beauty $170.83 314 4.1 157 SKU-002976
2977 Mega Office Supplies Product XL Office Supplies $532.41 218 2.3 10 SKU-002977
2978 Mega Office Supplies Product Classic Office Supplies $176.89 198 3.9 67 SKU-002978
2979 Economy Sports & Outdoors Product Advanced Sports & Outdoors $229.11 200 1.9 710 SKU-002979
2980 Ultra Home & Garden Product Special Edition Home & Garden $436.06 0 2.7 286 SKU-002980
2981 Professional Health & Beauty Product Mini Health & Beauty $733.90 291 4.8 497 SKU-002981
2982 Ultra Food & Grocery Product 2024 Food & Grocery $459.52 402 3.3 931 SKU-002982
2983 Deluxe Sports & Outdoors Product Plus Sports & Outdoors $453.07 125 1.2 444 SKU-002983
2984 Deluxe Health & Beauty Product Plus Health & Beauty $360.97 86 1.8 712 SKU-002984
2985 Ultra Clothing Product Max Clothing $869.57 469 2.1 525 SKU-002985
2986 Standard Food & Grocery Product Classic Food & Grocery $932.77 249 4.6 655 SKU-002986
2987 Deluxe Food & Grocery Product Max Food & Grocery $237.66 125 1.7 464 SKU-002987
2988 Standard Toys & Games Product Pro Toys & Games $633.37 80 1.0 573 SKU-002988
2989 Mega Clothing Product Pro Clothing $243.11 463 3.2 225 SKU-002989
2991 Standard Books Product Pro Books $761.52 447 1.7 146 SKU-002991
2992 Professional Office Supplies Product 2024 Office Supplies $95.42 48 1.4 286 SKU-002992
2993 Mega Health & Beauty Product Pro Health & Beauty $144.59 490 1.3 761 SKU-002993
2994 Elite Electronics Product XL Electronics $491.78 477 2.2 443 SKU-002994
2995 Super Health & Beauty Product Plus Health & Beauty $580.75 199 4.2 248 SKU-002995
2996 Super Sports & Outdoors Product XL Sports & Outdoors $249.91 87 1.3 485 SKU-002996
2997 Ultra Books Product Special Edition Books $93.94 493 1.1 597 SKU-002997
2998 Pro Books Product Mini Books $423.89 113 2.8 997 SKU-002998
2999 Deluxe Office Supplies Product Lite Office Supplies $549.70 148 4.2 615 SKU-002999
3001 Mega Automotive Product Classic Automotive $926.92 242 2.1 50 SKU-003001
3002 Mega Clothing Product Pro Clothing $38.85 349 4.4 623 SKU-003002
3004 Standard Toys & Games Product Mini Toys & Games $678.00 450 2.6 546 SKU-003004
3005 Standard Food & Grocery Product Pro Food & Grocery $535.87 235 2.2 126 SKU-003005
3006 Economy Food & Grocery Product XL Food & Grocery $754.99 88 3.4 428 SKU-003006
3007 Pro Automotive Product 2024 Automotive $570.60 301 4.1 92 SKU-003007
3009 Standard Books Product Mini Books $814.22 435 2.6 644 SKU-003009
3010 Standard Health & Beauty Product 2024 Health & Beauty $132.47 499 3.6 745 SKU-003010
3011 Premium Food & Grocery Product Pro Food & Grocery $676.35 181 1.1 953 SKU-003011
3012 Economy Toys & Games Product XL Toys & Games $626.10 296 1.2 405 SKU-003012
3013 Ultra Clothing Product Classic Clothing $43.85 140 1.1 230 SKU-003013
3014 Deluxe Electronics Product Pro Electronics $697.71 12 2.0 79 SKU-003014
3015 Ultra Home & Garden Product Mini Home & Garden $109.25 24 2.1 660 SKU-003015
3016 Elite Home & Garden Product Plus Home & Garden $681.68 376 4.8 286 SKU-003016
3017 Standard Toys & Games Product Pro Toys & Games $621.22 43 1.9 359 SKU-003017
3018 Mega Health & Beauty Product Plus Health & Beauty $931.58 222 3.0 53 SKU-003018
3019 Pro Books Product Special Edition Books $689.67 231 2.0 183 SKU-003019
3021 Professional Food & Grocery Product Plus Food & Grocery $978.51 328 4.9 257 SKU-003021
3022 Elite Home & Garden Product Mini Home & Garden $262.16 275 4.3 699 SKU-003022
3023 Deluxe Office Supplies Product Plus Office Supplies $613.74 27 2.7 610 SKU-003023
3024 Premium Toys & Games Product Special Edition Toys & Games $423.43 136 1.9 738 SKU-003024
3026 Ultra Toys & Games Product 2024 Toys & Games $18.12 220 4.1 758 SKU-003026
3028 Mega Books Product Pro Books $274.83 349 3.6 936 SKU-003028
3029 Elite Food & Grocery Product Classic Food & Grocery $293.32 386 2.1 988 SKU-003029
3030 Elite Books Product Classic Books $957.83 14 4.2 807 SKU-003030
3031 Standard Health & Beauty Product Pro Health & Beauty $763.32 432 4.9 246 SKU-003031
3032 Mega Health & Beauty Product Plus Health & Beauty $201.25 423 4.9 484 SKU-003032
3033 Super Sports & Outdoors Product Plus Sports & Outdoors $860.77 292 4.9 172 SKU-003033
3034 Mega Books Product Max Books $891.73 181 4.5 465 SKU-003034
3035 Ultra Books Product Plus Books $215.94 202 3.1 188 SKU-003035
3036 Premium Health & Beauty Product Special Edition Health & Beauty $106.45 245 2.7 972 SKU-003036
3037 Economy Office Supplies Product Max Office Supplies $267.97 417 3.8 331 SKU-003037
3038 Professional Health & Beauty Product 2024 Health & Beauty $474.09 434 2.1 81 SKU-003038
3039 Elite Office Supplies Product 2024 Office Supplies $881.24 113 2.1 832 SKU-003039
3040 Deluxe Home & Garden Product Special Edition Home & Garden $823.94 110 1.1 594 SKU-003040
3041 Economy Office Supplies Product 2024 Office Supplies $223.57 193 1.1 722 SKU-003041
3042 Pro Home & Garden Product Lite Home & Garden $522.14 127 1.3 687 SKU-003042
3043 Elite Food & Grocery Product Plus Food & Grocery $731.59 71 4.6 256 SKU-003043
3044 Super Automotive Product Classic Automotive $279.29 271 2.8 19 SKU-003044
3045 Economy Sports & Outdoors Product Mini Sports & Outdoors $791.22 163 2.6 434 SKU-003045
3046 Standard Sports & Outdoors Product XL Sports & Outdoors $145.60 387 4.8 673 SKU-003046
3049 Mega Toys & Games Product Special Edition Toys & Games $96.50 487 4.0 894 SKU-003049
3050 Ultra Food & Grocery Product Max Food & Grocery $714.57 275 1.4 568 SKU-003050
3051 Elite Books Product 2024 Books $553.29 308 3.0 299 SKU-003051
3052 Elite Office Supplies Product Plus Office Supplies $213.29 476 4.0 660 SKU-003052
3053 Super Office Supplies Product 2024 Office Supplies $105.70 353 2.8 356 SKU-003053
3054 Deluxe Electronics Product 2024 Electronics $253.36 159 2.2 456 SKU-003054
3055 Elite Electronics Product Lite Electronics $330.72 198 3.4 274 SKU-003055
3056 Super Food & Grocery Product Advanced Food & Grocery $255.66 279 2.6 650 SKU-003056
3057 Deluxe Electronics Product 2024 Electronics $58.64 225 3.6 338 SKU-003057
3058 Economy Health & Beauty Product XL Health & Beauty $950.15 305 2.7 569 SKU-003058
3059 Standard Toys & Games Product Advanced Toys & Games $602.59 357 2.0 741 SKU-003059
3060 Super Clothing Product Plus Clothing $40.92 205 1.3 507 SKU-003060
3061 Mega Toys & Games Product Classic Toys & Games $148.99 452 2.4 966 SKU-003061
3062 Economy Office Supplies Product Pro Office Supplies $287.42 383 3.5 129 SKU-003062
3064 Mega Food & Grocery Product Advanced Food & Grocery $792.70 389 3.1 152 SKU-003064
3065 Ultra Clothing Product Classic Clothing $813.37 451 4.0 323 SKU-003065
3066 Deluxe Clothing Product Pro Clothing $587.97 317 2.1 350 SKU-003066
3067 Standard Health & Beauty Product Max Health & Beauty $142.22 281 3.8 111 SKU-003067
3068 Super Sports & Outdoors Product Plus Sports & Outdoors $332.07 173 5.0 544 SKU-003068
3070 Deluxe Health & Beauty Product XL Health & Beauty $808.78 162 1.6 277 SKU-003070
3071 Professional Books Product Pro Books $460.34 60 4.3 751 SKU-003071
3072 Pro Home & Garden Product Classic Home & Garden $956.76 36 2.7 723 SKU-003072
3073 Professional Office Supplies Product Advanced Office Supplies $627.88 281 4.6 839 SKU-003073
3074 Ultra Food & Grocery Product Plus Food & Grocery $588.00 9 2.5 817 SKU-003074
3075 Standard Automotive Product Special Edition Automotive $113.85 475 3.8 152 SKU-003075
3076 Pro Electronics Product Max Electronics $96.93 490 4.5 80 SKU-003076
3078 Ultra Books Product Lite Books $804.45 287 1.7 854 SKU-003078
3079 Standard Electronics Product Classic Electronics $382.74 214 3.2 865 SKU-003079
3080 Ultra Home & Garden Product 2024 Home & Garden $643.65 299 3.9 663 SKU-003080
3081 Elite Food & Grocery Product Classic Food & Grocery $137.11 43 4.2 959 SKU-003081
3083 Standard Automotive Product Plus Automotive $119.95 102 1.1 644 SKU-003083
3084 Standard Sports & Outdoors Product Pro Sports & Outdoors $462.01 327 1.4 951 SKU-003084
3085 Standard Automotive Product Plus Automotive $807.00 175 2.4 287 SKU-003085
3086 Super Automotive Product Advanced Automotive $278.40 363 3.1 845 SKU-003086
3087 Professional Sports & Outdoors Product Plus Sports & Outdoors $94.70 44 4.6 142 SKU-003087
3088 Premium Office Supplies Product Special Edition Office Supplies $506.51 487 2.2 739 SKU-003088
3089 Economy Clothing Product Plus Clothing $25.78 277 3.2 227 SKU-003089
3090 Economy Books Product Plus Books $692.82 237 1.6 936 SKU-003090
3091 Economy Home & Garden Product Classic Home & Garden $783.50 132 4.8 918 SKU-003091
3092 Deluxe Electronics Product Max Electronics $680.91 384 3.1 880 SKU-003092
3093 Professional Electronics Product Classic Electronics $438.48 466 3.2 908 SKU-003093
3094 Standard Sports & Outdoors Product Pro Sports & Outdoors $307.66 44 1.3 716 SKU-003094
3095 Elite Food & Grocery Product XL Food & Grocery $194.48 42 2.6 993 SKU-003095
3097 Mega Sports & Outdoors Product Classic Sports & Outdoors $55.73 71 4.3 198 SKU-003097
3098 Mega Office Supplies Product Lite Office Supplies $234.04 342 1.1 862 SKU-003098
3099 Ultra Sports & Outdoors Product Special Edition Sports & Outdoors $86.25 388 3.1 562 SKU-003099
3100 Mega Automotive Product Lite Automotive $513.07 95 4.1 387 SKU-003100
3102 Economy Health & Beauty Product Mini Health & Beauty $657.67 6 3.8 112 SKU-003102
3103 Ultra Food & Grocery Product XL Food & Grocery $372.72 138 3.0 467 SKU-003103
3104 Premium Electronics Product 2024 Electronics $261.30 207 1.9 582 SKU-003104
3105 Elite Sports & Outdoors Product Special Edition Sports & Outdoors $655.04 49 3.5 226 SKU-003105
3106 Professional Health & Beauty Product Classic Health & Beauty $698.56 226 2.0 688 SKU-003106
3107 Mega Health & Beauty Product Advanced Health & Beauty $945.70 425 1.3 887 SKU-003107
3108 Elite Automotive Product Classic Automotive $242.57 82 2.3 481 SKU-003108
3109 Super Office Supplies Product Mini Office Supplies $46.35 170 3.2 87 SKU-003109
3111 Deluxe Home & Garden Product Classic Home & Garden $499.92 120 1.3 673 SKU-003111
3112 Ultra Books Product Pro Books $408.75 263 4.7 631 SKU-003112
3113 Standard Home & Garden Product Special Edition Home & Garden $364.54 218 2.0 499 SKU-003113
3114 Elite Clothing Product Plus Clothing $205.11 135 3.3 522 SKU-003114
3115 Super Automotive Product Plus Automotive $960.32 92 3.5 459 SKU-003115
3116 Premium Electronics Product Classic Electronics $290.00 279 3.4 422 SKU-003116
3117 Ultra Health & Beauty Product 2024 Health & Beauty $792.64 341 2.2 301 SKU-003117
3118 Premium Electronics Product Special Edition Electronics $233.76 121 4.7 101 SKU-003118
3119 Elite Clothing Product Mini Clothing $405.48 119 2.5 607 SKU-003119
3120 Premium Sports & Outdoors Product Special Edition Sports & Outdoors $410.55 235 3.5 302 SKU-003120
3121 Elite Automotive Product Mini Automotive $861.89 450 2.4 322 SKU-003121
3122 Premium Automotive Product Advanced Automotive $165.93 159 1.5 387 SKU-003122
3123 Premium Health & Beauty Product Mini Health & Beauty $927.96 483 2.6 51 SKU-003123
3124 Super Toys & Games Product Lite Toys & Games $629.27 5 1.5 355 SKU-003124
3125 Mega Office Supplies Product Classic Office Supplies $662.30 488 1.3 283 SKU-003125
3127 Economy Food & Grocery Product Plus Food & Grocery $472.15 464 2.9 694 SKU-003127
3128 Ultra Health & Beauty Product 2024 Health & Beauty $262.13 313 3.8 716 SKU-003128
3129 Standard Health & Beauty Product Mini Health & Beauty $523.80 89 4.6 562 SKU-003129
3130 Standard Toys & Games Product Plus Toys & Games $114.58 371 2.8 726 SKU-003130
3131 Super Health & Beauty Product Lite Health & Beauty $449.81 209 4.7 847 SKU-003131
3132 Premium Clothing Product Lite Clothing $571.50 304 1.4 241 SKU-003132
3133 Premium Sports & Outdoors Product Lite Sports & Outdoors $745.32 375 2.1 134 SKU-003133
3134 Mega Automotive Product Pro Automotive $388.29 196 3.0 734 SKU-003134
3135 Super Books Product 2024 Books $722.51 160 2.0 59 SKU-003135
3136 Economy Office Supplies Product Plus Office Supplies $566.30 138 4.7 908 SKU-003136
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