Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

69 ms

Page Size

200

Current Page

7 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 7 Results Showing 1201 - 1400 of 24441

ID Name Category Price Stock Rating Reviews SKU
1360 Professional Office Supplies Product Pro Office Supplies $987.21 127 1.2 281 SKU-001360
1361 Elite Books Product Advanced Books $160.80 146 3.9 709 SKU-001361
1362 Standard Automotive Product Advanced Automotive $161.56 187 4.9 642 SKU-001362
1363 Professional Clothing Product Pro Clothing $91.72 59 4.0 114 SKU-001363
1364 Standard Food & Grocery Product 2024 Food & Grocery $290.10 1 1.2 80 SKU-001364
1365 Elite Books Product Lite Books $666.92 320 2.9 914 SKU-001365
1366 Pro Automotive Product Special Edition Automotive $560.34 386 1.2 327 SKU-001366
1367 Deluxe Automotive Product 2024 Automotive $433.75 467 1.9 668 SKU-001367
1370 Deluxe Food & Grocery Product Mini Food & Grocery $700.74 379 4.2 55 SKU-001370
1371 Super Clothing Product 2024 Clothing $803.92 128 2.5 499 SKU-001371
1373 Pro Office Supplies Product Lite Office Supplies $45.29 72 4.4 672 SKU-001373
1374 Premium Toys & Games Product Advanced Toys & Games $792.31 371 1.7 428 SKU-001374
1375 Economy Office Supplies Product Classic Office Supplies $345.14 360 2.5 250 SKU-001375
1377 Super Books Product Pro Books $903.59 135 3.4 687 SKU-001377
1379 Premium Electronics Product Max Electronics $680.70 200 1.7 105 SKU-001379
1381 Standard Food & Grocery Product 2024 Food & Grocery $382.30 337 4.8 925 SKU-001381
1382 Pro Clothing Product Max Clothing $585.01 200 4.1 834 SKU-001382
1384 Elite Toys & Games Product Advanced Toys & Games $842.90 97 3.6 984 SKU-001384
1385 Ultra Toys & Games Product Advanced Toys & Games $590.41 343 4.5 633 SKU-001385
1386 Ultra Toys & Games Product Classic Toys & Games $816.66 439 1.8 40 SKU-001386
1388 Professional Health & Beauty Product Mini Health & Beauty $519.20 379 3.7 108 SKU-001388
1389 Super Office Supplies Product Max Office Supplies $514.47 159 3.6 299 SKU-001389
1390 Mega Automotive Product Classic Automotive $591.45 256 2.5 436 SKU-001390
1391 Pro Sports & Outdoors Product Special Edition Sports & Outdoors $333.07 382 4.2 392 SKU-001391
1392 Elite Sports & Outdoors Product Plus Sports & Outdoors $755.88 272 1.4 140 SKU-001392
1394 Professional Clothing Product Advanced Clothing $937.73 481 2.2 12 SKU-001394
1395 Ultra Books Product Max Books $318.70 125 4.6 166 SKU-001395
1396 Elite Toys & Games Product Pro Toys & Games $760.21 289 4.7 207 SKU-001396
1397 Professional Home & Garden Product Special Edition Home & Garden $892.70 173 4.9 592 SKU-001397
1398 Professional Electronics Product Max Electronics $836.52 408 3.0 270 SKU-001398
1399 Elite Food & Grocery Product Mini Food & Grocery $648.49 339 1.0 37 SKU-001399
1400 Pro Toys & Games Product Advanced Toys & Games $581.29 162 2.6 724 SKU-001400
1401 Ultra Sports & Outdoors Product Plus Sports & Outdoors $221.71 101 1.4 684 SKU-001401
1402 Premium Automotive Product Advanced Automotive $459.69 281 5.0 359 SKU-001402
1403 Economy Office Supplies Product Mini Office Supplies $445.45 285 2.5 387 SKU-001403
1404 Premium Home & Garden Product Lite Home & Garden $718.34 152 3.9 1 SKU-001404
1405 Ultra Clothing Product Mini Clothing $489.62 404 2.5 646 SKU-001405
1406 Professional Books Product Lite Books $29.52 404 2.7 747 SKU-001406
1407 Super Home & Garden Product Pro Home & Garden $615.14 176 4.0 762 SKU-001407
1408 Standard Sports & Outdoors Product XL Sports & Outdoors $30.37 212 4.2 477 SKU-001408
1409 Elite Health & Beauty Product Classic Health & Beauty $222.98 23 2.7 502 SKU-001409
1410 Professional Toys & Games Product Lite Toys & Games $955.27 156 2.1 3 SKU-001410
1411 Standard Sports & Outdoors Product XL Sports & Outdoors $572.85 288 3.3 949 SKU-001411
1412 Deluxe Automotive Product Pro Automotive $769.53 230 2.0 303 SKU-001412
1413 Premium Office Supplies Product Max Office Supplies $339.82 294 4.2 653 SKU-001413
1414 Standard Home & Garden Product XL Home & Garden $109.16 82 4.6 189 SKU-001414
1415 Mega Health & Beauty Product Advanced Health & Beauty $845.02 235 3.3 571 SKU-001415
1416 Deluxe Health & Beauty Product 2024 Health & Beauty $859.57 124 4.0 271 SKU-001416
1417 Ultra Office Supplies Product Mini Office Supplies $566.48 108 3.6 505 SKU-001417
1418 Economy Office Supplies Product Classic Office Supplies $559.24 172 1.4 796 SKU-001418
1419 Premium Office Supplies Product Special Edition Office Supplies $497.83 69 3.0 379 SKU-001419
1420 Standard Books Product Special Edition Books $154.45 72 4.0 648 SKU-001420
1422 Standard Electronics Product Pro Electronics $557.33 44 2.0 289 SKU-001422
1423 Premium Automotive Product Max Automotive $652.13 358 4.9 425 SKU-001423
1424 Professional Books Product 2024 Books $233.31 447 3.5 87 SKU-001424
1425 Premium Food & Grocery Product Lite Food & Grocery $545.49 141 3.8 620 SKU-001425
1426 Professional Home & Garden Product Lite Home & Garden $235.07 238 4.3 350 SKU-001426
1427 Super Office Supplies Product Plus Office Supplies $977.81 41 2.8 388 SKU-001427
1428 Super Health & Beauty Product Lite Health & Beauty $219.41 103 1.1 636 SKU-001428
1429 Mega Office Supplies Product Max Office Supplies $510.74 116 1.7 900 SKU-001429
1430 Professional Sports & Outdoors Product Plus Sports & Outdoors $991.55 279 4.3 128 SKU-001430
1432 Deluxe Electronics Product Lite Electronics $118.74 455 2.7 321 SKU-001432
1433 Economy Food & Grocery Product Lite Food & Grocery $915.59 389 2.7 35 SKU-001433
1434 Standard Automotive Product Advanced Automotive $117.47 307 1.6 224 SKU-001434
1435 Premium Sports & Outdoors Product Advanced Sports & Outdoors $640.58 388 3.1 413 SKU-001435
1436 Premium Clothing Product 2024 Clothing $823.31 363 1.1 145 SKU-001436
1437 Standard Toys & Games Product Lite Toys & Games $538.81 183 2.8 433 SKU-001437
1438 Ultra Health & Beauty Product Special Edition Health & Beauty $978.56 6 2.8 637 SKU-001438
1439 Mega Home & Garden Product Pro Home & Garden $397.16 153 1.5 580 SKU-001439
1440 Elite Office Supplies Product Max Office Supplies $25.97 17 4.8 705 SKU-001440
1441 Professional Automotive Product Advanced Automotive $932.41 245 4.3 755 SKU-001441
1443 Economy Books Product Classic Books $411.02 402 1.2 614 SKU-001443
1444 Elite Office Supplies Product Pro Office Supplies $129.28 286 3.4 352 SKU-001444
1446 Professional Clothing Product Max Clothing $803.27 34 1.8 565 SKU-001446
1447 Economy Food & Grocery Product XL Food & Grocery $874.71 174 2.5 482 SKU-001447
1448 Ultra Health & Beauty Product Plus Health & Beauty $287.03 195 4.1 259 SKU-001448
1449 Deluxe Electronics Product Mini Electronics $107.89 278 1.8 954 SKU-001449
1450 Professional Automotive Product XL Automotive $286.24 308 4.2 840 SKU-001450
1451 Mega Home & Garden Product Mini Home & Garden $897.73 313 3.0 96 SKU-001451
1452 Professional Toys & Games Product Plus Toys & Games $848.92 254 2.0 592 SKU-001452
1453 Pro Electronics Product Mini Electronics $805.46 325 2.5 918 SKU-001453
1454 Premium Office Supplies Product Pro Office Supplies $433.53 426 2.8 368 SKU-001454
1455 Professional Health & Beauty Product Lite Health & Beauty $720.10 20 2.8 163 SKU-001455
1456 Pro Health & Beauty Product Classic Health & Beauty $511.04 113 3.5 3 SKU-001456
1457 Premium Electronics Product Mini Electronics $220.21 65 2.5 262 SKU-001457
1458 Professional Books Product 2024 Books $409.14 6 2.9 864 SKU-001458
1459 Deluxe Office Supplies Product Advanced Office Supplies $307.02 167 2.7 363 SKU-001459
1461 Elite Food & Grocery Product 2024 Food & Grocery $329.89 422 3.6 374 SKU-001461
1462 Standard Toys & Games Product XL Toys & Games $925.16 432 3.4 527 SKU-001462
1463 Standard Sports & Outdoors Product Max Sports & Outdoors $450.51 271 2.8 133 SKU-001463
1464 Deluxe Home & Garden Product Mini Home & Garden $685.21 397 2.5 813 SKU-001464
1465 Premium Food & Grocery Product Classic Food & Grocery $571.85 459 3.7 746 SKU-001465
1466 Standard Home & Garden Product Plus Home & Garden $224.83 259 4.9 737 SKU-001466
1467 Deluxe Food & Grocery Product Classic Food & Grocery $403.78 13 3.6 991 SKU-001467
1468 Standard Books Product Classic Books $135.48 399 3.6 446 SKU-001468
1469 Professional Home & Garden Product Special Edition Home & Garden $848.17 45 1.5 628 SKU-001469
1470 Standard Electronics Product Max Electronics $815.22 67 2.6 468 SKU-001470
1472 Super Toys & Games Product Pro Toys & Games $194.85 207 5.0 643 SKU-001472
1473 Economy Toys & Games Product Advanced Toys & Games $539.48 479 2.9 454 SKU-001473
1474 Elite Health & Beauty Product Plus Health & Beauty $557.19 499 3.8 215 SKU-001474
1475 Super Books Product Pro Books $357.90 173 3.0 130 SKU-001475
1476 Super Food & Grocery Product 2024 Food & Grocery $775.41 318 2.4 593 SKU-001476
1477 Ultra Food & Grocery Product Mini Food & Grocery $115.87 44 2.6 161 SKU-001477
1478 Standard Clothing Product Mini Clothing $344.26 166 4.6 496 SKU-001478
1479 Ultra Office Supplies Product XL Office Supplies $569.54 354 1.2 777 SKU-001479
1480 Deluxe Sports & Outdoors Product Mini Sports & Outdoors $558.31 18 2.9 634 SKU-001480
1482 Super Health & Beauty Product Classic Health & Beauty $342.73 23 4.0 61 SKU-001482
1483 Economy Sports & Outdoors Product Lite Sports & Outdoors $588.00 258 2.9 332 SKU-001483
1484 Deluxe Electronics Product Special Edition Electronics $155.70 102 3.8 777 SKU-001484
1485 Super Office Supplies Product Special Edition Office Supplies $749.33 307 2.7 556 SKU-001485
1487 Standard Sports & Outdoors Product Classic Sports & Outdoors $405.14 267 4.7 552 SKU-001487
1488 Pro Clothing Product Plus Clothing $406.26 462 4.3 634 SKU-001488
1489 Elite Food & Grocery Product Classic Food & Grocery $161.25 52 4.5 489 SKU-001489
1490 Professional Health & Beauty Product Pro Health & Beauty $15.26 253 1.8 39 SKU-001490
1491 Deluxe Home & Garden Product Pro Home & Garden $721.22 252 2.3 503 SKU-001491
1493 Pro Books Product Special Edition Books $461.38 440 4.9 515 SKU-001493
1495 Ultra Automotive Product Plus Automotive $861.37 158 3.2 550 SKU-001495
1496 Super Food & Grocery Product Advanced Food & Grocery $730.90 427 3.7 947 SKU-001496
1497 Premium Electronics Product Plus Electronics $765.20 397 1.3 245 SKU-001497
1498 Super Health & Beauty Product Max Health & Beauty $477.86 77 4.9 807 SKU-001498
1499 Standard Toys & Games Product Plus Toys & Games $105.70 73 1.8 316 SKU-001499
1501 Pro Books Product XL Books $650.03 263 1.3 238 SKU-001501
1503 Ultra Food & Grocery Product Pro Food & Grocery $857.80 488 4.4 338 SKU-001503
1504 Mega Health & Beauty Product Mini Health & Beauty $423.19 406 4.1 811 SKU-001504
1505 Pro Sports & Outdoors Product Classic Sports & Outdoors $845.99 72 1.7 257 SKU-001505
1506 Premium Food & Grocery Product XL Food & Grocery $421.50 404 4.4 215 SKU-001506
1508 Deluxe Sports & Outdoors Product Lite Sports & Outdoors $454.86 444 2.5 228 SKU-001508
1509 Deluxe Toys & Games Product Advanced Toys & Games $724.10 383 4.1 696 SKU-001509
1510 Professional Automotive Product 2024 Automotive $797.29 134 2.1 985 SKU-001510
1511 Economy Automotive Product Advanced Automotive $677.02 322 3.9 518 SKU-001511
1512 Professional Electronics Product Pro Electronics $240.58 87 1.9 252 SKU-001512
1513 Premium Clothing Product Advanced Clothing $130.76 83 2.1 407 SKU-001513
1514 Mega Clothing Product Plus Clothing $828.33 53 1.8 215 SKU-001514
1515 Pro Sports & Outdoors Product Pro Sports & Outdoors $868.12 373 3.9 473 SKU-001515
1517 Elite Clothing Product Pro Clothing $415.24 444 4.9 795 SKU-001517
1518 Mega Electronics Product Lite Electronics $307.44 13 4.1 65 SKU-001518
1519 Super Office Supplies Product Advanced Office Supplies $609.21 443 4.9 71 SKU-001519
1521 Professional Automotive Product Mini Automotive $225.71 141 3.8 838 SKU-001521
1523 Standard Office Supplies Product Classic Office Supplies $314.92 174 1.3 973 SKU-001523
1524 Ultra Automotive Product Max Automotive $865.02 34 4.5 823 SKU-001524
1525 Mega Automotive Product XL Automotive $692.86 3 4.2 628 SKU-001525
1526 Super Food & Grocery Product Advanced Food & Grocery $870.29 92 1.6 594 SKU-001526
1527 Premium Books Product Advanced Books $670.04 310 2.4 327 SKU-001527
1528 Economy Home & Garden Product Mini Home & Garden $569.31 304 2.3 802 SKU-001528
1529 Economy Food & Grocery Product Classic Food & Grocery $953.47 102 1.9 978 SKU-001529
1530 Pro Books Product Pro Books $491.96 262 1.4 450 SKU-001530
1531 Mega Books Product 2024 Books $464.87 25 4.4 94 SKU-001531
1532 Elite Clothing Product Plus Clothing $592.82 159 4.8 22 SKU-001532
1533 Ultra Health & Beauty Product Max Health & Beauty $897.52 425 4.5 603 SKU-001533
1535 Economy Health & Beauty Product Pro Health & Beauty $435.60 328 4.1 614 SKU-001535
1536 Standard Food & Grocery Product Plus Food & Grocery $614.13 487 2.7 198 SKU-001536
1537 Deluxe Sports & Outdoors Product 2024 Sports & Outdoors $886.80 220 3.2 575 SKU-001537
1538 Elite Automotive Product XL Automotive $940.11 141 1.6 660 SKU-001538
1539 Professional Toys & Games Product Special Edition Toys & Games $550.19 88 2.6 722 SKU-001539
1540 Professional Toys & Games Product Plus Toys & Games $320.00 131 3.0 976 SKU-001540
1541 Standard Books Product Max Books $272.13 328 3.9 566 SKU-001541
1542 Super Food & Grocery Product 2024 Food & Grocery $63.13 122 2.3 649 SKU-001542
1543 Premium Toys & Games Product Pro Toys & Games $465.17 76 2.3 764 SKU-001543
1544 Standard Electronics Product Pro Electronics $524.83 467 1.6 368 SKU-001544
1545 Professional Books Product Advanced Books $54.09 54 2.6 801 SKU-001545
1546 Deluxe Home & Garden Product Lite Home & Garden $19.32 444 3.8 8 SKU-001546
1547 Pro Books Product Max Books $359.38 8 4.8 744 SKU-001547
1548 Super Food & Grocery Product Special Edition Food & Grocery $717.29 248 3.0 425 SKU-001548
1549 Economy Automotive Product 2024 Automotive $97.02 322 4.2 779 SKU-001549
1551 Standard Books Product 2024 Books $56.00 80 1.8 636 SKU-001551
1552 Economy Toys & Games Product Special Edition Toys & Games $946.50 321 1.8 840 SKU-001552
1553 Professional Food & Grocery Product Lite Food & Grocery $572.33 223 3.8 15 SKU-001553
1554 Mega Home & Garden Product Lite Home & Garden $915.04 374 3.7 607 SKU-001554
1555 Mega Clothing Product Plus Clothing $16.82 193 4.8 956 SKU-001555
1557 Pro Clothing Product Advanced Clothing $718.96 492 4.5 611 SKU-001557
1558 Super Health & Beauty Product Plus Health & Beauty $632.42 85 2.8 746 SKU-001558
1559 Professional Electronics Product Special Edition Electronics $133.05 183 4.0 590 SKU-001559
1560 Economy Food & Grocery Product XL Food & Grocery $821.53 144 3.1 382 SKU-001560
1561 Ultra Clothing Product XL Clothing $338.11 158 3.2 793 SKU-001561
1562 Economy Health & Beauty Product Max Health & Beauty $426.98 227 3.3 614 SKU-001562
1563 Professional Electronics Product Plus Electronics $875.87 94 2.9 105 SKU-001563
1564 Elite Office Supplies Product Lite Office Supplies $975.38 151 4.5 402 SKU-001564
1566 Pro Health & Beauty Product Advanced Health & Beauty $121.47 160 1.7 453 SKU-001566
1567 Professional Office Supplies Product Pro Office Supplies $868.49 465 4.3 810 SKU-001567
1568 Deluxe Automotive Product Plus Automotive $338.43 182 2.5 915 SKU-001568
1569 Ultra Office Supplies Product 2024 Office Supplies $109.95 86 3.9 803 SKU-001569
1570 Mega Clothing Product Lite Clothing $800.22 241 4.9 699 SKU-001570
1571 Standard Home & Garden Product Max Home & Garden $276.01 145 2.5 330 SKU-001571
1572 Standard Office Supplies Product 2024 Office Supplies $41.91 130 2.3 810 SKU-001572
1573 Pro Automotive Product Lite Automotive $498.35 327 1.1 700 SKU-001573
1575 Pro Office Supplies Product Classic Office Supplies $606.07 435 4.1 968 SKU-001575
1576 Ultra Health & Beauty Product XL Health & Beauty $148.27 432 3.3 70 SKU-001576
1577 Mega Clothing Product Lite Clothing $425.93 248 3.3 879 SKU-001577
1578 Ultra Health & Beauty Product XL Health & Beauty $756.39 400 3.7 75 SKU-001578
1579 Standard Clothing Product XL Clothing $186.57 173 2.8 554 SKU-001579
1581 Premium Electronics Product Mini Electronics $807.79 387 1.7 744 SKU-001581
1582 Standard Toys & Games Product 2024 Toys & Games $520.44 379 1.3 822 SKU-001582
1583 Standard Health & Beauty Product 2024 Health & Beauty $245.59 481 3.3 610 SKU-001583
1584 Pro Health & Beauty Product Mini Health & Beauty $958.86 400 2.9 323 SKU-001584
1585 Standard Food & Grocery Product Lite Food & Grocery $455.55 439 1.7 520 SKU-001585
1586 Standard Books Product Mini Books $929.25 357 3.0 612 SKU-001586
1587 Professional Sports & Outdoors Product Classic Sports & Outdoors $336.15 150 2.6 124 SKU-001587
1588 Premium Home & Garden Product Classic Home & Garden $286.23 167 3.1 143 SKU-001588
1589 Elite Health & Beauty Product Lite Health & Beauty $121.36 477 2.3 878 SKU-001589
1590 Premium Food & Grocery Product Max Food & Grocery $591.38 376 1.9 740 SKU-001590
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