Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

47 ms

Page Size

200

Current Page

6 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 6 Results Showing 1001 - 1200 of 24441

ID Name Category Price Stock Rating Reviews SKU
1127 Super Clothing Product Advanced Clothing $151.59 170 3.7 649 SKU-001127
1128 Pro Electronics Product XL Electronics $146.15 163 2.9 367 SKU-001128
1129 Deluxe Home & Garden Product Plus Home & Garden $873.68 132 1.5 753 SKU-001129
1130 Super Sports & Outdoors Product Pro Sports & Outdoors $154.17 427 3.4 598 SKU-001130
1131 Professional Home & Garden Product XL Home & Garden $391.05 464 4.3 886 SKU-001131
1132 Deluxe Electronics Product 2024 Electronics $901.33 71 4.3 511 SKU-001132
1133 Mega Toys & Games Product Mini Toys & Games $493.90 160 3.9 158 SKU-001133
1134 Mega Sports & Outdoors Product Mini Sports & Outdoors $781.40 19 1.6 563 SKU-001134
1135 Super Food & Grocery Product Pro Food & Grocery $851.50 55 3.6 231 SKU-001135
1136 Elite Electronics Product Mini Electronics $522.42 353 1.5 35 SKU-001136
1138 Premium Toys & Games Product Pro Toys & Games $632.88 338 1.3 622 SKU-001138
1139 Deluxe Clothing Product Classic Clothing $697.12 307 1.2 781 SKU-001139
1141 Elite Toys & Games Product Plus Toys & Games $749.64 479 5.0 657 SKU-001141
1142 Premium Clothing Product 2024 Clothing $598.14 296 2.1 461 SKU-001142
1144 Standard Sports & Outdoors Product XL Sports & Outdoors $881.78 97 1.1 791 SKU-001144
1145 Economy Office Supplies Product 2024 Office Supplies $286.68 278 3.7 697 SKU-001145
1146 Premium Automotive Product Lite Automotive $223.68 182 3.1 423 SKU-001146
1148 Pro Books Product Classic Books $405.58 224 3.9 713 SKU-001148
1149 Elite Sports & Outdoors Product Plus Sports & Outdoors $976.29 335 3.2 912 SKU-001149
1150 Premium Health & Beauty Product Mini Health & Beauty $184.48 363 1.3 285 SKU-001150
1151 Deluxe Books Product Lite Books $219.99 210 4.2 184 SKU-001151
1152 Standard Health & Beauty Product XL Health & Beauty $23.32 136 1.4 844 SKU-001152
1153 Deluxe Books Product XL Books $307.22 152 3.6 790 SKU-001153
1155 Elite Food & Grocery Product Classic Food & Grocery $303.05 469 4.3 96 SKU-001155
1156 Premium Automotive Product Special Edition Automotive $202.71 474 2.8 963 SKU-001156
1157 Super Sports & Outdoors Product Special Edition Sports & Outdoors $143.71 489 1.8 301 SKU-001157
1159 Premium Food & Grocery Product Advanced Food & Grocery $225.15 254 3.7 455 SKU-001159
1160 Professional Books Product Mini Books $270.32 239 2.7 677 SKU-001160
1161 Super Home & Garden Product XL Home & Garden $92.62 228 1.0 691 SKU-001161
1162 Ultra Health & Beauty Product Lite Health & Beauty $565.88 247 4.2 949 SKU-001162
1163 Professional Clothing Product Pro Clothing $147.33 89 3.7 719 SKU-001163
1164 Super Food & Grocery Product Classic Food & Grocery $161.87 303 4.9 574 SKU-001164
1165 Elite Books Product Max Books $21.11 450 4.6 173 SKU-001165
1166 Economy Home & Garden Product Classic Home & Garden $745.66 379 4.4 640 SKU-001166
1167 Pro Health & Beauty Product Special Edition Health & Beauty $479.86 348 2.9 296 SKU-001167
1168 Economy Toys & Games Product Lite Toys & Games $356.62 385 3.5 76 SKU-001168
1169 Mega Toys & Games Product Special Edition Toys & Games $467.91 20 4.6 728 SKU-001169
1170 Standard Health & Beauty Product Mini Health & Beauty $514.33 396 2.5 457 SKU-001170
1171 Pro Electronics Product Special Edition Electronics $518.28 238 2.6 518 SKU-001171
1172 Deluxe Electronics Product Max Electronics $69.98 276 3.6 770 SKU-001172
1173 Economy Electronics Product Mini Electronics $295.99 173 4.2 90 SKU-001173
1174 Deluxe Automotive Product Max Automotive $494.05 444 3.5 917 SKU-001174
1175 Elite Clothing Product XL Clothing $332.75 383 1.9 744 SKU-001175
1176 Deluxe Toys & Games Product XL Toys & Games $159.32 92 2.5 513 SKU-001176
1178 Premium Books Product 2024 Books $709.38 243 4.0 638 SKU-001178
1179 Premium Books Product Lite Books $834.76 218 4.1 189 SKU-001179
1180 Premium Automotive Product Lite Automotive $464.49 182 3.8 212 SKU-001180
1181 Ultra Clothing Product Classic Clothing $29.25 0 1.1 35 SKU-001181
1182 Standard Electronics Product XL Electronics $433.20 417 3.3 842 SKU-001182
1185 Mega Food & Grocery Product Plus Food & Grocery $279.97 38 2.7 707 SKU-001185
1186 Super Automotive Product Lite Automotive $882.04 45 3.4 394 SKU-001186
1188 Professional Sports & Outdoors Product Mini Sports & Outdoors $819.13 121 1.4 723 SKU-001188
1189 Elite Clothing Product Max Clothing $129.65 323 2.1 695 SKU-001189
1190 Mega Home & Garden Product Classic Home & Garden $453.60 311 2.2 475 SKU-001190
1191 Pro Food & Grocery Product Advanced Food & Grocery $121.00 182 1.0 225 SKU-001191
1192 Economy Toys & Games Product 2024 Toys & Games $264.31 443 4.6 931 SKU-001192
1193 Deluxe Automotive Product Special Edition Automotive $52.08 158 3.3 392 SKU-001193
1194 Standard Toys & Games Product Advanced Toys & Games $267.26 69 3.6 900 SKU-001194
1195 Economy Automotive Product 2024 Automotive $821.98 1 1.7 158 SKU-001195
1196 Ultra Office Supplies Product Plus Office Supplies $323.55 371 4.8 479 SKU-001196
1197 Elite Clothing Product Max Clothing $918.46 345 2.8 802 SKU-001197
1199 Premium Clothing Product Mini Clothing $644.90 20 3.7 62 SKU-001199
1201 Premium Health & Beauty Product Special Edition Health & Beauty $144.16 61 2.9 922 SKU-001201
1202 Deluxe Electronics Product Pro Electronics $294.63 397 1.7 205 SKU-001202
1203 Elite Automotive Product Mini Automotive $691.83 11 3.7 249 SKU-001203
1204 Premium Sports & Outdoors Product Plus Sports & Outdoors $937.15 242 2.8 462 SKU-001204
1205 Deluxe Books Product Special Edition Books $481.34 325 1.7 994 SKU-001205
1206 Pro Sports & Outdoors Product Special Edition Sports & Outdoors $227.82 313 3.6 258 SKU-001206
1207 Professional Books Product Mini Books $547.33 392 4.1 541 SKU-001207
1210 Standard Sports & Outdoors Product 2024 Sports & Outdoors $99.35 416 3.6 728 SKU-001210
1211 Economy Food & Grocery Product Lite Food & Grocery $661.49 138 3.4 367 SKU-001211
1212 Ultra Office Supplies Product Max Office Supplies $137.58 433 1.5 577 SKU-001212
1213 Pro Electronics Product Advanced Electronics $857.31 24 4.8 827 SKU-001213
1215 Super Books Product Classic Books $926.41 295 2.1 812 SKU-001215
1216 Elite Books Product Pro Books $909.51 98 3.2 305 SKU-001216
1217 Premium Health & Beauty Product Plus Health & Beauty $928.75 169 4.1 153 SKU-001217
1218 Deluxe Electronics Product Plus Electronics $559.56 76 4.3 851 SKU-001218
1219 Economy Books Product Plus Books $206.48 39 1.7 555 SKU-001219
1222 Ultra Sports & Outdoors Product Classic Sports & Outdoors $81.48 161 1.9 449 SKU-001222
1223 Premium Toys & Games Product Special Edition Toys & Games $161.40 344 4.3 212 SKU-001223
1224 Super Electronics Product XL Electronics $457.61 384 3.7 382 SKU-001224
1225 Elite Health & Beauty Product Pro Health & Beauty $17.24 374 3.5 350 SKU-001225
1226 Mega Toys & Games Product Advanced Toys & Games $169.76 363 2.8 918 SKU-001226
1227 Deluxe Automotive Product XL Automotive $657.02 70 2.9 921 SKU-001227
1228 Pro Books Product Lite Books $944.62 203 3.0 317 SKU-001228
1229 Super Books Product Special Edition Books $465.10 487 4.8 208 SKU-001229
1230 Professional Toys & Games Product Plus Toys & Games $795.69 184 4.4 991 SKU-001230
1231 Elite Home & Garden Product Classic Home & Garden $284.85 340 4.7 30 SKU-001231
1232 Pro Health & Beauty Product Lite Health & Beauty $743.47 253 4.8 748 SKU-001232
1233 Pro Food & Grocery Product Special Edition Food & Grocery $613.52 185 2.2 71 SKU-001233
1234 Deluxe Home & Garden Product Plus Home & Garden $657.78 337 4.6 247 SKU-001234
1235 Deluxe Food & Grocery Product Plus Food & Grocery $491.24 296 4.4 955 SKU-001235
1236 Deluxe Automotive Product Classic Automotive $890.63 497 1.0 296 SKU-001236
1237 Pro Books Product XL Books $866.71 332 4.5 949 SKU-001237
1239 Elite Clothing Product XL Clothing $409.93 337 2.0 531 SKU-001239
1240 Mega Toys & Games Product Advanced Toys & Games $259.66 377 4.0 981 SKU-001240
1241 Pro Toys & Games Product Special Edition Toys & Games $591.07 33 4.2 388 SKU-001241
1242 Elite Home & Garden Product Classic Home & Garden $576.58 279 2.6 398 SKU-001242
1243 Ultra Office Supplies Product Special Edition Office Supplies $915.01 97 2.8 390 SKU-001243
1244 Pro Health & Beauty Product Plus Health & Beauty $986.51 267 3.7 595 SKU-001244
1245 Ultra Home & Garden Product 2024 Home & Garden $115.12 28 4.9 877 SKU-001245
1246 Elite Health & Beauty Product XL Health & Beauty $321.91 92 4.1 210 SKU-001246
1247 Mega Home & Garden Product Classic Home & Garden $802.69 9 3.0 670 SKU-001247
1248 Standard Electronics Product Mini Electronics $727.55 85 1.6 741 SKU-001248
1249 Ultra Home & Garden Product Advanced Home & Garden $611.68 51 4.6 38 SKU-001249
1250 Professional Clothing Product Max Clothing $831.98 497 3.9 251 SKU-001250
1251 Ultra Food & Grocery Product 2024 Food & Grocery $306.33 238 1.5 611 SKU-001251
1252 Deluxe Books Product Advanced Books $288.50 191 3.8 122 SKU-001252
1254 Ultra Clothing Product XL Clothing $417.67 475 1.7 747 SKU-001254
1256 Pro Health & Beauty Product XL Health & Beauty $175.16 195 3.3 413 SKU-001256
1257 Economy Sports & Outdoors Product Max Sports & Outdoors $732.81 120 3.1 752 SKU-001257
1259 Pro Books Product Classic Books $673.28 105 3.9 737 SKU-001259
1260 Economy Home & Garden Product Advanced Home & Garden $806.58 109 3.6 220 SKU-001260
1261 Ultra Health & Beauty Product Pro Health & Beauty $694.71 315 2.2 843 SKU-001261
1262 Mega Books Product Plus Books $943.40 93 1.5 326 SKU-001262
1263 Elite Toys & Games Product Advanced Toys & Games $998.91 347 4.6 804 SKU-001263
1264 Ultra Automotive Product Plus Automotive $379.27 263 4.2 48 SKU-001264
1265 Economy Health & Beauty Product XL Health & Beauty $107.01 335 1.7 343 SKU-001265
1267 Deluxe Food & Grocery Product XL Food & Grocery $679.81 327 2.7 367 SKU-001267
1268 Professional Clothing Product Lite Clothing $403.04 423 4.0 159 SKU-001268
1269 Professional Clothing Product Special Edition Clothing $768.97 314 2.8 431 SKU-001269
1270 Professional Automotive Product Advanced Automotive $737.85 233 3.6 932 SKU-001270
1271 Standard Automotive Product Classic Automotive $445.32 201 1.9 18 SKU-001271
1272 Ultra Home & Garden Product XL Home & Garden $411.19 283 1.7 401 SKU-001272
1273 Super Toys & Games Product 2024 Toys & Games $509.49 427 3.3 225 SKU-001273
1274 Deluxe Clothing Product Plus Clothing $502.84 133 4.8 102 SKU-001274
1275 Economy Office Supplies Product Max Office Supplies $377.26 377 4.9 458 SKU-001275
1276 Super Home & Garden Product Lite Home & Garden $634.84 143 2.2 258 SKU-001276
1277 Super Health & Beauty Product 2024 Health & Beauty $758.63 350 2.4 593 SKU-001277
1279 Ultra Toys & Games Product 2024 Toys & Games $423.34 405 1.4 815 SKU-001279
1280 Economy Home & Garden Product Advanced Home & Garden $210.17 212 4.5 316 SKU-001280
1281 Deluxe Electronics Product Max Electronics $162.08 321 3.6 823 SKU-001281
1282 Super Clothing Product Plus Clothing $316.41 491 2.0 175 SKU-001282
1283 Standard Office Supplies Product Lite Office Supplies $72.51 92 4.4 403 SKU-001283
1284 Premium Electronics Product Classic Electronics $133.24 428 2.3 659 SKU-001284
1285 Ultra Toys & Games Product 2024 Toys & Games $256.73 373 3.6 854 SKU-001285
1286 Ultra Health & Beauty Product Mini Health & Beauty $88.47 423 1.6 150 SKU-001286
1287 Deluxe Automotive Product Max Automotive $877.19 382 3.7 780 SKU-001287
1288 Ultra Clothing Product Max Clothing $366.91 292 2.3 273 SKU-001288
1289 Pro Automotive Product 2024 Automotive $369.08 155 3.8 955 SKU-001289
1290 Deluxe Books Product Advanced Books $460.01 302 3.1 498 SKU-001290
1291 Premium Clothing Product Classic Clothing $358.36 62 4.5 479 SKU-001291
1292 Elite Books Product Advanced Books $907.84 163 3.8 459 SKU-001292
1293 Elite Clothing Product Lite Clothing $441.87 160 1.9 417 SKU-001293
1294 Mega Office Supplies Product 2024 Office Supplies $215.78 138 3.3 203 SKU-001294
1295 Economy Sports & Outdoors Product Special Edition Sports & Outdoors $378.57 178 3.8 293 SKU-001295
1296 Ultra Electronics Product Advanced Electronics $390.82 488 3.0 280 SKU-001296
1297 Professional Electronics Product Plus Electronics $314.00 230 4.7 376 SKU-001297
1298 Ultra Toys & Games Product Plus Toys & Games $743.74 433 1.3 835 SKU-001298
1300 Professional Books Product Classic Books $278.36 482 1.0 661 SKU-001300
1301 Premium Clothing Product Advanced Clothing $385.62 101 4.9 914 SKU-001301
1302 Ultra Clothing Product Lite Clothing $358.08 352 4.9 265 SKU-001302
1303 Economy Electronics Product Lite Electronics $563.14 303 3.0 928 SKU-001303
1304 Pro Electronics Product Max Electronics $160.29 468 1.4 253 SKU-001304
1305 Elite Home & Garden Product Plus Home & Garden $254.35 106 1.5 385 SKU-001305
1306 Ultra Electronics Product Classic Electronics $431.15 444 2.6 246 SKU-001306
1307 Economy Health & Beauty Product Special Edition Health & Beauty $367.00 270 4.5 979 SKU-001307
1308 Elite Home & Garden Product Pro Home & Garden $720.92 118 3.9 346 SKU-001308
1309 Professional Health & Beauty Product 2024 Health & Beauty $734.71 346 2.3 998 SKU-001309
1311 Ultra Books Product Classic Books $542.76 190 4.7 401 SKU-001311
1312 Economy Office Supplies Product Plus Office Supplies $176.60 237 2.0 521 SKU-001312
1313 Pro Office Supplies Product 2024 Office Supplies $83.96 48 4.7 41 SKU-001313
1314 Deluxe Electronics Product 2024 Electronics $853.18 377 4.5 630 SKU-001314
1315 Deluxe Electronics Product Plus Electronics $674.88 450 2.4 441 SKU-001315
1316 Economy Books Product Classic Books $859.83 491 3.8 376 SKU-001316
1318 Mega Automotive Product Lite Automotive $340.46 271 2.9 784 SKU-001318
1319 Pro Food & Grocery Product Advanced Food & Grocery $822.50 428 2.5 509 SKU-001319
1321 Pro Food & Grocery Product Special Edition Food & Grocery $480.56 256 2.0 860 SKU-001321
1322 Mega Automotive Product Plus Automotive $78.80 413 2.3 818 SKU-001322
1323 Mega Books Product Plus Books $73.06 316 3.9 998 SKU-001323
1324 Pro Office Supplies Product Lite Office Supplies $474.48 152 3.5 191 SKU-001324
1325 Professional Electronics Product 2024 Electronics $816.48 420 1.0 30 SKU-001325
1326 Super Home & Garden Product Advanced Home & Garden $248.61 49 3.7 620 SKU-001326
1327 Premium Books Product 2024 Books $720.14 79 4.4 597 SKU-001327
1328 Mega Automotive Product Special Edition Automotive $180.03 405 2.5 400 SKU-001328
1330 Standard Health & Beauty Product Max Health & Beauty $481.45 438 4.7 199 SKU-001330
1332 Deluxe Sports & Outdoors Product Advanced Sports & Outdoors $698.91 3 2.6 692 SKU-001332
1333 Economy Food & Grocery Product Advanced Food & Grocery $341.32 204 3.7 639 SKU-001333
1334 Super Clothing Product Special Edition Clothing $217.64 49 4.4 392 SKU-001334
1335 Ultra Sports & Outdoors Product Mini Sports & Outdoors $642.01 298 1.1 807 SKU-001335
1336 Elite Clothing Product Max Clothing $815.53 191 2.9 73 SKU-001336
1337 Professional Books Product Pro Books $530.74 263 1.6 983 SKU-001337
1338 Mega Home & Garden Product Special Edition Home & Garden $718.30 163 2.5 368 SKU-001338
1339 Pro Office Supplies Product Pro Office Supplies $363.35 341 2.6 505 SKU-001339
1341 Standard Books Product Lite Books $192.45 240 3.5 478 SKU-001341
1342 Economy Automotive Product Special Edition Automotive $624.59 171 1.8 219 SKU-001342
1343 Ultra Toys & Games Product XL Toys & Games $704.58 479 2.0 574 SKU-001343
1344 Pro Home & Garden Product XL Home & Garden $865.44 169 5.0 634 SKU-001344
1345 Standard Clothing Product Pro Clothing $172.63 68 3.6 843 SKU-001345
1346 Ultra Food & Grocery Product Classic Food & Grocery $356.07 191 2.4 87 SKU-001346
1347 Ultra Toys & Games Product Advanced Toys & Games $333.29 255 4.8 311 SKU-001347
1348 Mega Health & Beauty Product Mini Health & Beauty $722.72 85 1.8 13 SKU-001348
1350 Professional Office Supplies Product Mini Office Supplies $188.27 44 3.2 16 SKU-001350
1352 Super Sports & Outdoors Product Classic Sports & Outdoors $201.95 259 1.1 316 SKU-001352
1353 Professional Toys & Games Product Plus Toys & Games $764.40 111 3.8 546 SKU-001353
1354 Standard Food & Grocery Product Lite Food & Grocery $704.98 84 3.6 394 SKU-001354
1355 Super Sports & Outdoors Product Special Edition Sports & Outdoors $468.33 139 1.4 277 SKU-001355
1356 Professional Food & Grocery Product Advanced Food & Grocery $464.59 416 3.0 401 SKU-001356
1357 Super Electronics Product Advanced Electronics $788.28 124 3.8 644 SKU-001357
1358 Standard Clothing Product 2024 Clothing $198.25 343 4.2 756 SKU-001358
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