Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

6 ms

Page Size

200

Current Page

3 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 3 Results Showing 401 - 600 of 24441

ID Name Category Price Stock Rating Reviews SKU
448 Pro Toys & Games Product Plus Toys & Games $953.86 485 1.4 585 SKU-000448
450 Ultra Clothing Product Classic Clothing $402.45 493 4.3 648 SKU-000450
451 Ultra Office Supplies Product Special Edition Office Supplies $20.75 170 3.7 952 SKU-000451
452 Professional Electronics Product Special Edition Electronics $645.14 171 1.7 300 SKU-000452
453 Mega Food & Grocery Product Max Food & Grocery $188.84 222 2.5 364 SKU-000453
455 Super Toys & Games Product Classic Toys & Games $521.92 88 2.5 100 SKU-000455
457 Mega Home & Garden Product Plus Home & Garden $172.98 105 2.2 844 SKU-000457
458 Standard Home & Garden Product Mini Home & Garden $233.01 456 1.1 265 SKU-000458
459 Mega Toys & Games Product Special Edition Toys & Games $470.70 226 3.9 343 SKU-000459
460 Ultra Sports & Outdoors Product Pro Sports & Outdoors $852.07 331 3.9 659 SKU-000460
461 Pro Automotive Product Special Edition Automotive $907.92 200 4.5 936 SKU-000461
462 Mega Health & Beauty Product Classic Health & Beauty $596.82 473 3.1 996 SKU-000462
463 Elite Home & Garden Product Plus Home & Garden $383.00 421 3.2 106 SKU-000463
464 Mega Health & Beauty Product Mini Health & Beauty $539.16 24 3.8 919 SKU-000464
465 Premium Clothing Product Pro Clothing $45.09 109 2.1 358 SKU-000465
466 Ultra Office Supplies Product Plus Office Supplies $433.00 411 3.2 388 SKU-000466
467 Elite Clothing Product Plus Clothing $782.17 69 4.2 787 SKU-000467
468 Economy Clothing Product Advanced Clothing $373.03 415 4.1 323 SKU-000468
469 Mega Automotive Product Max Automotive $236.74 322 2.2 628 SKU-000469
470 Super Sports & Outdoors Product Max Sports & Outdoors $511.10 335 2.8 171 SKU-000470
471 Standard Clothing Product Lite Clothing $233.46 309 4.1 447 SKU-000471
472 Super Home & Garden Product Classic Home & Garden $297.59 345 3.3 168 SKU-000472
473 Ultra Automotive Product XL Automotive $84.95 67 4.2 388 SKU-000473
475 Mega Books Product Classic Books $917.04 425 1.9 395 SKU-000475
476 Professional Clothing Product Lite Clothing $614.20 376 3.1 266 SKU-000476
477 Deluxe Home & Garden Product XL Home & Garden $484.71 160 4.9 30 SKU-000477
478 Ultra Sports & Outdoors Product Special Edition Sports & Outdoors $733.98 383 2.1 150 SKU-000478
479 Ultra Clothing Product Special Edition Clothing $389.33 186 3.6 232 SKU-000479
480 Premium Toys & Games Product Advanced Toys & Games $102.55 390 4.0 182 SKU-000480
481 Pro Automotive Product Mini Automotive $969.07 497 2.4 293 SKU-000481
482 Mega Electronics Product Plus Electronics $56.54 376 4.7 217 SKU-000482
483 Standard Food & Grocery Product Special Edition Food & Grocery $103.47 388 1.5 283 SKU-000483
484 Professional Sports & Outdoors Product 2024 Sports & Outdoors $563.71 43 3.2 779 SKU-000484
485 Super Sports & Outdoors Product Lite Sports & Outdoors $426.26 473 2.4 762 SKU-000485
486 Super Toys & Games Product Classic Toys & Games $621.60 225 1.3 261 SKU-000486
488 Standard Sports & Outdoors Product Pro Sports & Outdoors $546.60 310 4.0 485 SKU-000488
489 Premium Food & Grocery Product 2024 Food & Grocery $217.57 31 1.0 57 SKU-000489
490 Pro Books Product XL Books $903.70 258 3.8 577 SKU-000490
491 Ultra Office Supplies Product Max Office Supplies $553.61 371 2.4 275 SKU-000491
492 Elite Toys & Games Product Max Toys & Games $645.79 247 3.4 801 SKU-000492
493 Deluxe Automotive Product Advanced Automotive $866.01 8 1.9 820 SKU-000493
494 Standard Electronics Product Special Edition Electronics $145.78 306 4.4 660 SKU-000494
495 Elite Clothing Product XL Clothing $883.14 36 2.6 10 SKU-000495
496 Premium Automotive Product Advanced Automotive $155.99 497 2.3 658 SKU-000496
497 Premium Sports & Outdoors Product Plus Sports & Outdoors $318.57 155 1.8 178 SKU-000497
498 Deluxe Sports & Outdoors Product Advanced Sports & Outdoors $209.03 251 1.0 667 SKU-000498
499 Premium Home & Garden Product Advanced Home & Garden $31.31 329 4.1 11 SKU-000499
500 Professional Food & Grocery Product Pro Food & Grocery $202.85 131 2.1 998 SKU-000500
501 Super Toys & Games Product Special Edition Toys & Games $959.88 430 4.6 130 SKU-000501
502 Pro Toys & Games Product Lite Toys & Games $837.04 166 4.5 283 SKU-000502
503 Super Toys & Games Product Pro Toys & Games $942.15 264 1.2 141 SKU-000503
504 Mega Food & Grocery Product Pro Food & Grocery $174.03 279 1.4 947 SKU-000504
505 Premium Toys & Games Product Plus Toys & Games $132.44 344 4.5 113 SKU-000505
506 Professional Toys & Games Product XL Toys & Games $357.14 218 3.8 918 SKU-000506
507 Ultra Home & Garden Product 2024 Home & Garden $585.15 99 1.9 471 SKU-000507
508 Deluxe Home & Garden Product Advanced Home & Garden $481.14 182 1.8 611 SKU-000508
509 Premium Toys & Games Product Lite Toys & Games $281.77 492 1.5 18 SKU-000509
510 Standard Toys & Games Product 2024 Toys & Games $644.04 446 1.3 712 SKU-000510
511 Standard Office Supplies Product XL Office Supplies $994.62 60 4.3 557 SKU-000511
512 Elite Sports & Outdoors Product Max Sports & Outdoors $534.38 84 3.2 161 SKU-000512
513 Professional Automotive Product Advanced Automotive $730.03 220 4.2 879 SKU-000513
514 Elite Office Supplies Product 2024 Office Supplies $37.88 267 3.3 495 SKU-000514
515 Economy Electronics Product Pro Electronics $705.11 234 3.4 93 SKU-000515
516 Economy Clothing Product 2024 Clothing $543.55 177 4.5 343 SKU-000516
517 Pro Office Supplies Product Plus Office Supplies $142.26 17 2.7 820 SKU-000517
518 Premium Automotive Product Pro Automotive $395.08 331 1.3 65 SKU-000518
519 Super Books Product Lite Books $466.75 14 2.2 929 SKU-000519
520 Standard Home & Garden Product XL Home & Garden $940.41 314 2.6 50 SKU-000520
521 Pro Electronics Product XL Electronics $258.47 203 1.9 163 SKU-000521
523 Elite Automotive Product Classic Automotive $263.42 277 1.9 573 SKU-000523
524 Super Health & Beauty Product XL Health & Beauty $222.95 468 4.3 214 SKU-000524
525 Pro Home & Garden Product Plus Home & Garden $138.42 211 3.7 453 SKU-000525
526 Ultra Books Product XL Books $638.43 369 2.9 931 SKU-000526
527 Elite Office Supplies Product Lite Office Supplies $876.91 470 2.3 376 SKU-000527
528 Economy Sports & Outdoors Product Classic Sports & Outdoors $772.68 74 1.8 868 SKU-000528
529 Ultra Automotive Product Plus Automotive $333.72 104 3.7 205 SKU-000529
530 Economy Toys & Games Product Mini Toys & Games $344.11 234 1.4 99 SKU-000530
532 Ultra Automotive Product Plus Automotive $232.07 236 3.0 412 SKU-000532
533 Super Health & Beauty Product Lite Health & Beauty $888.41 470 3.0 453 SKU-000533
534 Deluxe Books Product 2024 Books $991.87 408 2.3 933 SKU-000534
535 Professional Sports & Outdoors Product XL Sports & Outdoors $177.24 110 4.1 902 SKU-000535
536 Deluxe Clothing Product Pro Clothing $490.41 270 3.0 872 SKU-000536
537 Economy Office Supplies Product XL Office Supplies $937.15 171 1.3 951 SKU-000537
538 Super Toys & Games Product Advanced Toys & Games $544.09 174 4.8 815 SKU-000538
539 Elite Home & Garden Product Classic Home & Garden $209.34 116 4.3 852 SKU-000539
540 Standard Automotive Product Max Automotive $933.88 10 3.2 172 SKU-000540
541 Pro Books Product XL Books $319.96 280 4.2 349 SKU-000541
542 Super Electronics Product Mini Electronics $398.57 120 2.1 480 SKU-000542
543 Ultra Health & Beauty Product Plus Health & Beauty $450.25 246 1.8 61 SKU-000543
544 Standard Health & Beauty Product Max Health & Beauty $470.95 192 2.0 577 SKU-000544
545 Professional Clothing Product Lite Clothing $99.37 90 2.3 941 SKU-000545
547 Super Office Supplies Product Pro Office Supplies $533.41 111 1.8 231 SKU-000547
548 Deluxe Sports & Outdoors Product 2024 Sports & Outdoors $339.49 138 2.5 594 SKU-000548
549 Deluxe Books Product Classic Books $47.34 117 1.3 468 SKU-000549
550 Super Office Supplies Product Plus Office Supplies $518.64 456 2.0 113 SKU-000550
551 Professional Office Supplies Product Plus Office Supplies $191.93 368 1.6 508 SKU-000551
552 Pro Food & Grocery Product Classic Food & Grocery $293.50 277 1.3 956 SKU-000552
553 Pro Health & Beauty Product Max Health & Beauty $509.33 9 4.4 450 SKU-000553
554 Ultra Automotive Product Lite Automotive $467.20 424 3.3 288 SKU-000554
555 Standard Automotive Product Pro Automotive $654.94 468 4.0 400 SKU-000555
558 Deluxe Health & Beauty Product Lite Health & Beauty $420.61 214 4.7 673 SKU-000558
559 Standard Food & Grocery Product XL Food & Grocery $911.41 102 3.1 973 SKU-000559
560 Professional Electronics Product Advanced Electronics $779.95 374 4.2 912 SKU-000560
561 Ultra Office Supplies Product XL Office Supplies $520.25 366 1.2 493 SKU-000561
563 Standard Home & Garden Product XL Home & Garden $731.91 476 2.2 329 SKU-000563
564 Economy Books Product Max Books $590.87 359 2.6 282 SKU-000564
567 Professional Home & Garden Product Max Home & Garden $284.90 154 3.6 436 SKU-000567
568 Deluxe Home & Garden Product 2024 Home & Garden $51.93 86 4.5 524 SKU-000568
569 Elite Toys & Games Product Mini Toys & Games $728.69 360 1.6 676 SKU-000569
570 Super Electronics Product Max Electronics $383.22 395 1.7 665 SKU-000570
571 Ultra Books Product Pro Books $54.16 370 2.3 47 SKU-000571
572 Deluxe Toys & Games Product Max Toys & Games $923.45 94 1.7 760 SKU-000572
573 Ultra Food & Grocery Product Classic Food & Grocery $454.31 449 2.8 37 SKU-000573
575 Mega Clothing Product Advanced Clothing $974.36 298 3.8 184 SKU-000575
576 Super Office Supplies Product XL Office Supplies $67.64 35 3.2 427 SKU-000576
577 Ultra Sports & Outdoors Product Advanced Sports & Outdoors $64.77 414 1.7 310 SKU-000577
578 Economy Electronics Product Pro Electronics $877.15 477 2.5 454 SKU-000578
579 Mega Home & Garden Product Pro Home & Garden $395.84 293 2.5 114 SKU-000579
581 Ultra Office Supplies Product Pro Office Supplies $698.20 205 1.8 557 SKU-000581
582 Professional Clothing Product Max Clothing $266.87 91 1.5 351 SKU-000582
583 Elite Automotive Product XL Automotive $240.07 403 1.2 147 SKU-000583
584 Premium Automotive Product Lite Automotive $181.58 441 4.7 771 SKU-000584
585 Standard Books Product Pro Books $708.75 432 2.4 203 SKU-000585
586 Deluxe Health & Beauty Product Pro Health & Beauty $33.87 390 4.7 395 SKU-000586
587 Mega Automotive Product Mini Automotive $112.19 231 2.8 85 SKU-000587
588 Pro Automotive Product XL Automotive $423.90 294 2.8 410 SKU-000588
589 Super Automotive Product 2024 Automotive $892.79 378 1.4 702 SKU-000589
590 Deluxe Health & Beauty Product Classic Health & Beauty $312.40 43 3.1 657 SKU-000590
591 Economy Sports & Outdoors Product Pro Sports & Outdoors $827.17 449 4.2 347 SKU-000591
592 Pro Automotive Product 2024 Automotive $473.74 77 3.2 650 SKU-000592
593 Pro Home & Garden Product Pro Home & Garden $786.59 117 2.3 490 SKU-000593
594 Pro Toys & Games Product Mini Toys & Games $237.75 319 2.8 5 SKU-000594
595 Super Clothing Product 2024 Clothing $429.34 431 2.1 10 SKU-000595
596 Super Office Supplies Product Plus Office Supplies $195.53 415 4.1 56 SKU-000596
597 Deluxe Food & Grocery Product Lite Food & Grocery $742.12 400 2.9 5 SKU-000597
598 Standard Sports & Outdoors Product Special Edition Sports & Outdoors $224.62 470 3.0 436 SKU-000598
599 Premium Health & Beauty Product Mini Health & Beauty $884.66 307 1.3 659 SKU-000599
600 Professional Electronics Product Pro Electronics $420.31 67 4.6 8 SKU-000600
601 Premium Sports & Outdoors Product XL Sports & Outdoors $947.61 77 2.7 617 SKU-000601
602 Deluxe Electronics Product Mini Electronics $710.63 221 2.8 324 SKU-000602
603 Economy Home & Garden Product Lite Home & Garden $361.62 464 2.8 727 SKU-000603
605 Premium Clothing Product XL Clothing $102.28 269 4.6 119 SKU-000605
606 Premium Sports & Outdoors Product Classic Sports & Outdoors $961.94 278 3.6 260 SKU-000606
607 Pro Food & Grocery Product Mini Food & Grocery $625.26 419 1.3 16 SKU-000607
608 Super Food & Grocery Product Special Edition Food & Grocery $99.52 388 3.8 857 SKU-000608
609 Pro Home & Garden Product Plus Home & Garden $749.81 403 5.0 134 SKU-000609
610 Premium Health & Beauty Product Lite Health & Beauty $465.61 388 2.0 368 SKU-000610
611 Standard Home & Garden Product Plus Home & Garden $946.30 456 3.5 295 SKU-000611
612 Elite Automotive Product Classic Automotive $702.50 377 2.2 107 SKU-000612
613 Deluxe Automotive Product XL Automotive $107.71 449 3.2 208 SKU-000613
614 Mega Home & Garden Product Max Home & Garden $489.81 215 3.5 520 SKU-000614
615 Standard Home & Garden Product Plus Home & Garden $82.54 220 2.6 141 SKU-000615
616 Standard Sports & Outdoors Product Lite Sports & Outdoors $653.27 70 2.3 585 SKU-000616
618 Professional Electronics Product Pro Electronics $930.24 117 2.3 439 SKU-000618
619 Economy Health & Beauty Product Classic Health & Beauty $415.28 325 2.6 445 SKU-000619
620 Elite Office Supplies Product Classic Office Supplies $278.16 224 3.0 173 SKU-000620
621 Pro Sports & Outdoors Product Classic Sports & Outdoors $238.32 262 1.8 601 SKU-000621
623 Super Clothing Product Mini Clothing $974.10 73 2.8 252 SKU-000623
624 Economy Automotive Product 2024 Automotive $576.20 111 3.9 638 SKU-000624
625 Standard Health & Beauty Product Lite Health & Beauty $643.12 442 4.3 672 SKU-000625
627 Deluxe Office Supplies Product XL Office Supplies $911.48 417 1.9 122 SKU-000627
628 Super Sports & Outdoors Product Lite Sports & Outdoors $747.01 36 4.7 906 SKU-000628
629 Deluxe Office Supplies Product Lite Office Supplies $860.22 17 4.7 374 SKU-000629
630 Economy Home & Garden Product Mini Home & Garden $843.36 99 4.3 266 SKU-000630
631 Deluxe Books Product Lite Books $695.48 275 1.2 553 SKU-000631
633 Pro Health & Beauty Product XL Health & Beauty $313.50 408 2.5 279 SKU-000633
634 Mega Toys & Games Product Lite Toys & Games $870.29 186 2.1 403 SKU-000634
635 Premium Food & Grocery Product Mini Food & Grocery $827.74 270 3.0 293 SKU-000635
636 Super Electronics Product Advanced Electronics $866.19 173 2.7 788 SKU-000636
637 Pro Food & Grocery Product Advanced Food & Grocery $700.93 103 3.7 388 SKU-000637
638 Mega Office Supplies Product Pro Office Supplies $697.54 221 4.0 334 SKU-000638
639 Ultra Books Product Plus Books $608.58 490 1.9 886 SKU-000639
640 Standard Office Supplies Product Advanced Office Supplies $151.24 95 3.0 635 SKU-000640
641 Deluxe Books Product Max Books $828.95 172 1.5 832 SKU-000641
643 Super Automotive Product Max Automotive $330.87 459 3.4 876 SKU-000643
644 Mega Automotive Product Max Automotive $119.42 443 3.5 691 SKU-000644
645 Super Clothing Product Lite Clothing $143.45 266 3.4 534 SKU-000645
646 Super Sports & Outdoors Product Classic Sports & Outdoors $655.97 330 2.9 556 SKU-000646
647 Deluxe Toys & Games Product Plus Toys & Games $688.70 108 4.7 252 SKU-000647
648 Professional Health & Beauty Product Pro Health & Beauty $830.91 493 1.9 211 SKU-000648
649 Economy Sports & Outdoors Product Lite Sports & Outdoors $301.96 118 4.3 324 SKU-000649
650 Professional Sports & Outdoors Product Plus Sports & Outdoors $501.88 10 4.6 657 SKU-000650
651 Economy Books Product XL Books $329.29 398 1.2 47 SKU-000651
652 Professional Home & Garden Product Lite Home & Garden $873.88 289 1.5 808 SKU-000652
653 Premium Home & Garden Product Pro Home & Garden $609.93 184 2.0 388 SKU-000653
654 Ultra Automotive Product Pro Automotive $526.63 169 2.4 948 SKU-000654
655 Professional Sports & Outdoors Product Classic Sports & Outdoors $148.19 485 1.5 311 SKU-000655
656 Economy Office Supplies Product Mini Office Supplies $491.35 155 1.6 194 SKU-000656
657 Mega Food & Grocery Product Plus Food & Grocery $583.72 382 1.9 602 SKU-000657
659 Pro Clothing Product Classic Clothing $660.34 442 1.0 524 SKU-000659
660 Professional Toys & Games Product Pro Toys & Games $597.96 477 2.5 879 SKU-000660
661 Pro Home & Garden Product Classic Home & Garden $200.24 266 1.4 471 SKU-000661
663 Deluxe Office Supplies Product Pro Office Supplies $584.27 355 1.8 446 SKU-000663
664 Deluxe Electronics Product Pro Electronics $482.20 101 4.8 180 SKU-000664
665 Professional Clothing Product Classic Clothing $440.60 284 3.0 379 SKU-000665
666 Ultra Health & Beauty Product Mini Health & Beauty $730.59 287 3.8 39 SKU-000666
667 Ultra Clothing Product Classic Clothing $310.05 383 3.5 484 SKU-000667
668 Mega Clothing Product 2024 Clothing $738.66 74 3.8 105 SKU-000668
669 Mega Books Product Special Edition Books $440.59 381 3.1 760 SKU-000669
670 Mega Office Supplies Product XL Office Supplies $617.35 278 1.2 580 SKU-000670
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