Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

92 ms

Page Size

200

Current Page

5 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 5 Results Showing 801 - 1000 of 24441

ID Name Category Price Stock Rating Reviews SKU
894 Ultra Automotive Product Mini Automotive $315.96 56 4.8 815 SKU-000894
895 Ultra Home & Garden Product Special Edition Home & Garden $408.76 126 1.8 217 SKU-000895
896 Super Food & Grocery Product XL Food & Grocery $550.85 392 2.0 332 SKU-000896
897 Standard Food & Grocery Product Classic Food & Grocery $601.19 335 3.4 784 SKU-000897
899 Deluxe Electronics Product Lite Electronics $352.87 425 4.9 402 SKU-000899
900 Premium Home & Garden Product Special Edition Home & Garden $258.80 57 3.3 167 SKU-000900
901 Deluxe Electronics Product Max Electronics $399.46 422 4.4 949 SKU-000901
903 Deluxe Toys & Games Product Lite Toys & Games $892.13 258 2.1 693 SKU-000903
904 Super Home & Garden Product Classic Home & Garden $210.57 89 1.3 110 SKU-000904
905 Premium Clothing Product Pro Clothing $462.39 241 1.1 175 SKU-000905
906 Economy Home & Garden Product Mini Home & Garden $244.59 470 2.3 636 SKU-000906
907 Elite Home & Garden Product Advanced Home & Garden $774.40 123 3.8 875 SKU-000907
908 Professional Office Supplies Product Classic Office Supplies $729.55 180 2.9 949 SKU-000908
910 Economy Home & Garden Product Max Home & Garden $822.57 339 2.9 3 SKU-000910
911 Elite Health & Beauty Product XL Health & Beauty $854.05 316 4.3 334 SKU-000911
912 Economy Electronics Product Mini Electronics $921.11 406 2.0 665 SKU-000912
913 Standard Books Product 2024 Books $100.01 45 1.5 424 SKU-000913
915 Elite Clothing Product Mini Clothing $56.66 319 2.4 168 SKU-000915
917 Pro Electronics Product Max Electronics $15.74 187 3.3 645 SKU-000917
918 Economy Toys & Games Product 2024 Toys & Games $475.64 187 4.0 835 SKU-000918
919 Economy Electronics Product Lite Electronics $69.26 18 1.7 56 SKU-000919
921 Professional Food & Grocery Product XL Food & Grocery $687.41 349 3.8 148 SKU-000921
922 Deluxe Toys & Games Product Lite Toys & Games $20.83 152 1.2 16 SKU-000922
923 Pro Food & Grocery Product Advanced Food & Grocery $784.13 312 2.5 840 SKU-000923
924 Premium Health & Beauty Product 2024 Health & Beauty $150.93 3 1.3 741 SKU-000924
926 Elite Toys & Games Product Classic Toys & Games $64.80 345 4.5 104 SKU-000926
927 Economy Books Product Mini Books $341.15 160 4.3 635 SKU-000927
928 Economy Electronics Product 2024 Electronics $615.56 95 1.4 851 SKU-000928
929 Premium Automotive Product Classic Automotive $932.99 59 2.0 321 SKU-000929
930 Pro Clothing Product Max Clothing $42.18 212 4.7 347 SKU-000930
932 Professional Food & Grocery Product Mini Food & Grocery $939.41 439 1.3 23 SKU-000932
933 Professional Electronics Product Classic Electronics $522.45 398 3.8 806 SKU-000933
935 Mega Books Product Lite Books $650.88 418 1.7 212 SKU-000935
936 Mega Books Product Plus Books $239.45 9 3.2 357 SKU-000936
937 Mega Toys & Games Product Pro Toys & Games $889.19 440 3.8 32 SKU-000937
938 Professional Home & Garden Product 2024 Home & Garden $330.39 163 1.0 851 SKU-000938
939 Economy Automotive Product Mini Automotive $330.66 36 4.8 967 SKU-000939
940 Pro Health & Beauty Product 2024 Health & Beauty $82.18 103 2.5 960 SKU-000940
941 Economy Office Supplies Product Advanced Office Supplies $283.55 208 3.2 363 SKU-000941
942 Mega Home & Garden Product Lite Home & Garden $585.28 214 2.4 931 SKU-000942
943 Pro Clothing Product Plus Clothing $272.57 128 4.4 419 SKU-000943
944 Super Books Product Plus Books $532.47 41 5.0 653 SKU-000944
945 Professional Office Supplies Product 2024 Office Supplies $200.76 215 4.5 463 SKU-000945
946 Super Food & Grocery Product Classic Food & Grocery $269.46 244 4.4 928 SKU-000946
947 Elite Electronics Product Advanced Electronics $883.39 31 2.3 742 SKU-000947
948 Professional Office Supplies Product Advanced Office Supplies $153.28 96 2.9 508 SKU-000948
949 Standard Food & Grocery Product Plus Food & Grocery $765.52 56 4.8 441 SKU-000949
950 Professional Home & Garden Product Lite Home & Garden $272.89 37 5.0 679 SKU-000950
951 Deluxe Books Product Lite Books $738.94 341 3.4 469 SKU-000951
952 Mega Books Product Mini Books $743.49 47 2.5 929 SKU-000952
953 Ultra Books Product Mini Books $569.74 209 2.7 483 SKU-000953
954 Economy Office Supplies Product Classic Office Supplies $514.38 121 4.4 488 SKU-000954
955 Pro Clothing Product XL Clothing $720.20 85 4.6 939 SKU-000955
956 Standard Food & Grocery Product Max Food & Grocery $436.98 54 3.8 266 SKU-000956
957 Elite Food & Grocery Product Pro Food & Grocery $195.16 246 2.2 539 SKU-000957
958 Economy Automotive Product Classic Automotive $552.14 356 4.9 490 SKU-000958
959 Professional Office Supplies Product Mini Office Supplies $587.09 308 1.7 764 SKU-000959
960 Mega Toys & Games Product Advanced Toys & Games $528.70 170 2.1 142 SKU-000960
961 Ultra Sports & Outdoors Product Lite Sports & Outdoors $758.16 432 3.4 314 SKU-000961
962 Mega Home & Garden Product XL Home & Garden $529.59 7 3.9 862 SKU-000962
963 Ultra Automotive Product Special Edition Automotive $873.63 365 4.7 20 SKU-000963
964 Deluxe Office Supplies Product Plus Office Supplies $928.90 460 1.1 723 SKU-000964
966 Pro Books Product Lite Books $563.80 388 4.1 818 SKU-000966
967 Economy Home & Garden Product Mini Home & Garden $582.50 220 2.0 130 SKU-000967
968 Pro Clothing Product Plus Clothing $981.13 334 3.5 393 SKU-000968
969 Pro Books Product Max Books $712.09 313 3.5 100 SKU-000969
971 Pro Clothing Product Max Clothing $699.63 464 1.2 428 SKU-000971
972 Professional Home & Garden Product Plus Home & Garden $456.36 43 1.4 83 SKU-000972
973 Mega Sports & Outdoors Product Special Edition Sports & Outdoors $893.03 491 4.2 196 SKU-000973
974 Standard Clothing Product 2024 Clothing $438.05 446 3.3 368 SKU-000974
975 Premium Clothing Product Max Clothing $872.94 281 3.4 809 SKU-000975
976 Super Sports & Outdoors Product Special Edition Sports & Outdoors $954.74 291 2.4 487 SKU-000976
977 Elite Electronics Product Classic Electronics $673.63 185 4.5 64 SKU-000977
978 Standard Toys & Games Product Pro Toys & Games $666.97 155 4.9 93 SKU-000978
980 Standard Office Supplies Product Lite Office Supplies $201.67 376 4.9 7 SKU-000980
981 Mega Health & Beauty Product Advanced Health & Beauty $124.65 263 4.1 837 SKU-000981
982 Deluxe Food & Grocery Product Advanced Food & Grocery $313.53 350 4.3 883 SKU-000982
983 Standard Home & Garden Product XL Home & Garden $882.82 197 3.3 961 SKU-000983
984 Super Sports & Outdoors Product Pro Sports & Outdoors $164.50 489 3.8 731 SKU-000984
985 Mega Food & Grocery Product Mini Food & Grocery $82.68 142 4.9 934 SKU-000985
987 Deluxe Clothing Product 2024 Clothing $255.76 150 4.2 169 SKU-000987
988 Premium Health & Beauty Product Mini Health & Beauty $26.01 321 3.8 960 SKU-000988
989 Professional Office Supplies Product Max Office Supplies $80.55 218 2.2 702 SKU-000989
990 Pro Automotive Product Special Edition Automotive $894.25 309 1.6 798 SKU-000990
991 Professional Health & Beauty Product Mini Health & Beauty $659.15 92 2.8 588 SKU-000991
992 Deluxe Electronics Product Lite Electronics $484.22 283 1.1 27 SKU-000992
993 Premium Clothing Product Lite Clothing $581.44 139 3.1 287 SKU-000993
994 Pro Office Supplies Product Lite Office Supplies $168.65 452 1.7 190 SKU-000994
995 Economy Automotive Product Classic Automotive $13.12 434 3.8 931 SKU-000995
997 Premium Automotive Product Lite Automotive $119.93 347 3.3 107 SKU-000997
998 Professional Food & Grocery Product Plus Food & Grocery $581.31 316 3.2 768 SKU-000998
999 Professional Food & Grocery Product Lite Food & Grocery $631.66 300 4.7 524 SKU-000999
1000 Economy Food & Grocery Product Special Edition Food & Grocery $846.27 186 4.3 980 SKU-001000
1001 Economy Office Supplies Product Special Edition Office Supplies $773.78 375 1.9 572 SKU-001001
1002 Deluxe Health & Beauty Product Advanced Health & Beauty $957.81 368 2.9 835 SKU-001002
1003 Economy Clothing Product Lite Clothing $113.78 410 3.4 779 SKU-001003
1004 Economy Books Product Lite Books $596.95 411 1.8 344 SKU-001004
1005 Economy Office Supplies Product Plus Office Supplies $319.10 261 1.8 223 SKU-001005
1007 Super Home & Garden Product Plus Home & Garden $531.19 251 2.0 572 SKU-001007
1008 Deluxe Office Supplies Product Classic Office Supplies $580.50 230 4.2 418 SKU-001008
1009 Elite Books Product Lite Books $452.43 458 3.3 256 SKU-001009
1010 Mega Office Supplies Product Lite Office Supplies $655.10 376 3.4 896 SKU-001010
1012 Pro Food & Grocery Product Classic Food & Grocery $960.45 146 1.4 241 SKU-001012
1013 Standard Electronics Product XL Electronics $653.71 323 1.8 572 SKU-001013
1015 Elite Toys & Games Product Max Toys & Games $661.83 85 2.7 689 SKU-001015
1016 Economy Automotive Product Pro Automotive $569.78 33 4.4 305 SKU-001016
1017 Elite Electronics Product Classic Electronics $573.84 455 1.4 626 SKU-001017
1018 Ultra Home & Garden Product 2024 Home & Garden $365.65 86 2.4 686 SKU-001018
1019 Premium Home & Garden Product Classic Home & Garden $863.39 467 3.0 837 SKU-001019
1020 Elite Home & Garden Product Lite Home & Garden $464.07 7 2.5 99 SKU-001020
1021 Deluxe Automotive Product 2024 Automotive $687.74 386 3.2 235 SKU-001021
1022 Super Sports & Outdoors Product XL Sports & Outdoors $266.40 428 3.0 97 SKU-001022
1023 Elite Toys & Games Product Special Edition Toys & Games $645.19 172 2.6 970 SKU-001023
1025 Mega Home & Garden Product Advanced Home & Garden $240.08 209 2.7 258 SKU-001025
1027 Elite Health & Beauty Product Plus Health & Beauty $37.70 104 3.6 764 SKU-001027
1028 Ultra Food & Grocery Product XL Food & Grocery $107.16 437 2.4 153 SKU-001028
1029 Deluxe Books Product Pro Books $199.95 425 2.4 64 SKU-001029
1032 Premium Food & Grocery Product Mini Food & Grocery $147.32 29 4.8 121 SKU-001032
1034 Economy Home & Garden Product Special Edition Home & Garden $703.11 387 3.8 319 SKU-001034
1035 Super Health & Beauty Product Max Health & Beauty $307.22 300 4.7 534 SKU-001035
1036 Deluxe Toys & Games Product Advanced Toys & Games $962.05 481 1.8 604 SKU-001036
1037 Ultra Electronics Product Classic Electronics $499.36 50 4.0 791 SKU-001037
1038 Elite Health & Beauty Product Mini Health & Beauty $890.33 237 4.5 702 SKU-001038
1039 Professional Automotive Product Lite Automotive $985.93 322 2.9 763 SKU-001039
1040 Pro Home & Garden Product Special Edition Home & Garden $834.34 27 3.3 157 SKU-001040
1041 Premium Electronics Product Classic Electronics $820.99 50 4.3 854 SKU-001041
1042 Elite Toys & Games Product Classic Toys & Games $645.04 167 4.7 267 SKU-001042
1043 Elite Health & Beauty Product Special Edition Health & Beauty $182.90 133 2.9 380 SKU-001043
1044 Standard Electronics Product Pro Electronics $480.76 42 1.3 47 SKU-001044
1045 Premium Books Product Max Books $213.60 340 2.2 667 SKU-001045
1046 Standard Home & Garden Product XL Home & Garden $505.25 439 1.5 574 SKU-001046
1047 Standard Food & Grocery Product Max Food & Grocery $658.65 464 1.3 766 SKU-001047
1048 Mega Automotive Product Lite Automotive $120.25 261 2.5 265 SKU-001048
1049 Super Home & Garden Product Pro Home & Garden $757.73 362 3.1 912 SKU-001049
1050 Premium Books Product Pro Books $824.57 126 1.8 849 SKU-001050
1051 Economy Office Supplies Product Max Office Supplies $909.78 81 2.8 356 SKU-001051
1052 Mega Office Supplies Product Plus Office Supplies $547.15 335 2.4 230 SKU-001052
1053 Elite Electronics Product Mini Electronics $55.59 124 4.6 662 SKU-001053
1054 Professional Automotive Product Lite Automotive $928.01 214 1.7 517 SKU-001054
1055 Pro Health & Beauty Product Plus Health & Beauty $699.40 434 1.5 808 SKU-001055
1056 Economy Electronics Product Advanced Electronics $926.45 411 1.6 574 SKU-001056
1057 Professional Food & Grocery Product 2024 Food & Grocery $70.10 133 1.0 298 SKU-001057
1059 Standard Books Product Special Edition Books $97.10 433 1.0 901 SKU-001059
1061 Ultra Clothing Product Special Edition Clothing $718.70 269 3.1 526 SKU-001061
1062 Professional Home & Garden Product XL Home & Garden $737.42 90 3.5 695 SKU-001062
1064 Premium Toys & Games Product XL Toys & Games $224.38 379 2.3 0 SKU-001064
1065 Mega Home & Garden Product Advanced Home & Garden $499.27 121 2.3 586 SKU-001065
1066 Elite Clothing Product Mini Clothing $816.89 199 3.4 607 SKU-001066
1067 Elite Sports & Outdoors Product Advanced Sports & Outdoors $585.66 384 3.3 65 SKU-001067
1068 Economy Clothing Product Pro Clothing $928.88 310 2.0 783 SKU-001068
1069 Ultra Sports & Outdoors Product Plus Sports & Outdoors $68.75 418 4.2 927 SKU-001069
1070 Premium Health & Beauty Product Special Edition Health & Beauty $688.48 183 2.4 253 SKU-001070
1071 Professional Automotive Product Advanced Automotive $352.53 391 1.3 867 SKU-001071
1072 Elite Health & Beauty Product Classic Health & Beauty $114.98 290 3.3 699 SKU-001072
1074 Deluxe Food & Grocery Product Special Edition Food & Grocery $740.81 432 1.8 791 SKU-001074
1075 Standard Books Product 2024 Books $562.61 329 1.6 984 SKU-001075
1076 Premium Office Supplies Product Classic Office Supplies $436.97 63 5.0 140 SKU-001076
1077 Elite Books Product Lite Books $694.75 427 4.5 418 SKU-001077
1078 Economy Automotive Product Lite Automotive $55.89 447 2.1 514 SKU-001078
1079 Standard Automotive Product Mini Automotive $604.53 232 1.9 864 SKU-001079
1080 Premium Office Supplies Product Lite Office Supplies $585.01 314 3.9 79 SKU-001080
1081 Premium Office Supplies Product Lite Office Supplies $389.72 280 3.2 786 SKU-001081
1082 Super Office Supplies Product 2024 Office Supplies $567.39 379 3.1 406 SKU-001082
1083 Standard Clothing Product Special Edition Clothing $388.21 175 1.4 135 SKU-001083
1084 Economy Clothing Product Special Edition Clothing $772.68 398 1.2 224 SKU-001084
1085 Mega Health & Beauty Product Special Edition Health & Beauty $741.15 458 3.6 386 SKU-001085
1086 Deluxe Clothing Product XL Clothing $962.66 133 1.2 679 SKU-001086
1087 Ultra Books Product Max Books $522.00 353 4.0 468 SKU-001087
1088 Pro Sports & Outdoors Product XL Sports & Outdoors $346.24 158 1.0 524 SKU-001088
1089 Standard Automotive Product Pro Automotive $536.27 168 2.4 899 SKU-001089
1090 Elite Electronics Product Lite Electronics $454.77 109 4.3 416 SKU-001090
1091 Ultra Automotive Product 2024 Automotive $973.19 78 4.2 246 SKU-001091
1092 Pro Electronics Product Plus Electronics $949.74 250 3.3 901 SKU-001092
1094 Pro Food & Grocery Product XL Food & Grocery $236.50 49 3.0 214 SKU-001094
1096 Super Toys & Games Product Plus Toys & Games $485.24 251 1.1 906 SKU-001096
1097 Economy Toys & Games Product Classic Toys & Games $847.62 338 3.7 387 SKU-001097
1098 Super Clothing Product Lite Clothing $653.28 54 4.8 898 SKU-001098
1099 Ultra Automotive Product Classic Automotive $756.19 139 4.3 738 SKU-001099
1100 Super Food & Grocery Product XL Food & Grocery $403.13 61 2.9 337 SKU-001100
1101 Standard Office Supplies Product Special Edition Office Supplies $612.03 79 3.8 648 SKU-001101
1102 Standard Toys & Games Product Lite Toys & Games $558.76 135 2.6 664 SKU-001102
1103 Ultra Automotive Product Pro Automotive $499.08 20 4.8 383 SKU-001103
1104 Super Home & Garden Product Pro Home & Garden $780.91 362 4.7 136 SKU-001104
1105 Deluxe Office Supplies Product Plus Office Supplies $966.37 425 1.0 614 SKU-001105
1106 Economy Home & Garden Product Plus Home & Garden $178.79 480 3.7 690 SKU-001106
1108 Elite Books Product 2024 Books $447.91 74 3.9 480 SKU-001108
1109 Premium Clothing Product Special Edition Clothing $197.08 339 4.7 505 SKU-001109
1110 Deluxe Electronics Product Pro Electronics $683.61 87 4.8 320 SKU-001110
1111 Pro Clothing Product XL Clothing $680.94 194 4.4 44 SKU-001111
1112 Elite Food & Grocery Product Lite Food & Grocery $831.54 374 3.8 31 SKU-001112
1115 Super Books Product Max Books $931.87 326 4.7 954 SKU-001115
1116 Deluxe Office Supplies Product Special Edition Office Supplies $700.17 133 1.9 453 SKU-001116
1118 Economy Electronics Product Max Electronics $492.68 184 3.8 932 SKU-001118
1119 Deluxe Food & Grocery Product 2024 Food & Grocery $471.44 127 4.4 822 SKU-001119
1121 Premium Clothing Product Special Edition Clothing $350.45 351 2.4 811 SKU-001121
1122 Elite Food & Grocery Product XL Food & Grocery $486.01 246 4.1 172 SKU-001122
1123 Elite Health & Beauty Product Special Edition Health & Beauty $626.48 457 4.5 193 SKU-001123
1124 Professional Health & Beauty Product Max Health & Beauty $106.42 36 2.5 194 SKU-001124
1125 Super Food & Grocery Product Plus Food & Grocery $939.23 122 3.0 299 SKU-001125
1126 Ultra Home & Garden Product Special Edition Home & Garden $160.25 211 1.8 588 SKU-001126
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