Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

12 ms

Page Size

200

Current Page

17 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 17 Results Showing 3201 - 3400 of 24441

ID Name Category Price Stock Rating Reviews SKU
3596 Mega Office Supplies Product Mini Office Supplies $670.22 356 1.2 919 SKU-003596
3597 Elite Health & Beauty Product Pro Health & Beauty $198.69 32 3.3 375 SKU-003597
3598 Standard Office Supplies Product Mini Office Supplies $317.02 13 4.3 622 SKU-003598
3599 Pro Books Product Lite Books $230.88 20 2.3 958 SKU-003599
3600 Super Office Supplies Product Pro Office Supplies $191.71 448 3.0 515 SKU-003600
3601 Premium Sports & Outdoors Product Advanced Sports & Outdoors $405.55 109 2.0 214 SKU-003601
3602 Premium Automotive Product Mini Automotive $320.01 468 4.4 638 SKU-003602
3603 Super Toys & Games Product Special Edition Toys & Games $272.73 295 3.0 911 SKU-003603
3604 Pro Health & Beauty Product Plus Health & Beauty $337.23 477 1.2 675 SKU-003604
3605 Standard Clothing Product Lite Clothing $978.04 398 1.8 94 SKU-003605
3606 Economy Sports & Outdoors Product Plus Sports & Outdoors $193.88 139 3.9 871 SKU-003606
3607 Premium Home & Garden Product Pro Home & Garden $561.06 313 4.5 422 SKU-003607
3608 Super Home & Garden Product Mini Home & Garden $20.23 276 4.7 498 SKU-003608
3609 Premium Automotive Product Mini Automotive $860.49 258 1.7 690 SKU-003609
3610 Elite Health & Beauty Product Max Health & Beauty $426.21 444 2.9 321 SKU-003610
3611 Elite Office Supplies Product XL Office Supplies $759.27 292 5.0 602 SKU-003611
3612 Elite Books Product Mini Books $588.49 438 1.3 775 SKU-003612
3613 Deluxe Electronics Product Plus Electronics $536.65 448 3.5 843 SKU-003613
3614 Mega Sports & Outdoors Product Special Edition Sports & Outdoors $200.05 374 4.1 25 SKU-003614
3615 Pro Food & Grocery Product 2024 Food & Grocery $69.12 49 1.1 531 SKU-003615
3616 Mega Automotive Product Max Automotive $753.04 463 2.5 967 SKU-003616
3617 Ultra Health & Beauty Product 2024 Health & Beauty $666.98 168 1.3 177 SKU-003617
3618 Standard Clothing Product Plus Clothing $846.89 196 4.1 262 SKU-003618
3619 Deluxe Sports & Outdoors Product Pro Sports & Outdoors $698.23 92 2.0 842 SKU-003619
3620 Professional Sports & Outdoors Product Lite Sports & Outdoors $593.11 180 3.9 611 SKU-003620
3621 Elite Clothing Product Classic Clothing $121.51 298 1.2 161 SKU-003621
3622 Professional Automotive Product Advanced Automotive $479.30 408 3.9 922 SKU-003622
3623 Elite Health & Beauty Product Lite Health & Beauty $728.11 42 3.1 424 SKU-003623
3624 Professional Toys & Games Product XL Toys & Games $647.25 236 2.9 949 SKU-003624
3625 Deluxe Toys & Games Product Lite Toys & Games $953.88 465 2.1 937 SKU-003625
3626 Pro Office Supplies Product Lite Office Supplies $738.73 293 2.6 879 SKU-003626
3628 Ultra Toys & Games Product Max Toys & Games $986.10 348 4.5 437 SKU-003628
3630 Ultra Home & Garden Product 2024 Home & Garden $980.75 24 3.4 169 SKU-003630
3631 Mega Office Supplies Product 2024 Office Supplies $293.47 446 3.6 777 SKU-003631
3632 Elite Toys & Games Product Plus Toys & Games $308.22 44 2.8 328 SKU-003632
3633 Super Sports & Outdoors Product Lite Sports & Outdoors $852.37 378 3.6 394 SKU-003633
3634 Standard Home & Garden Product 2024 Home & Garden $351.75 452 1.4 71 SKU-003634
3635 Deluxe Food & Grocery Product Advanced Food & Grocery $409.68 70 1.6 843 SKU-003635
3636 Economy Clothing Product Plus Clothing $535.80 286 3.6 880 SKU-003636
3638 Professional Food & Grocery Product Classic Food & Grocery $949.35 122 2.3 449 SKU-003638
3639 Elite Sports & Outdoors Product Special Edition Sports & Outdoors $842.93 350 4.4 504 SKU-003639
3640 Standard Sports & Outdoors Product Pro Sports & Outdoors $480.87 427 4.0 225 SKU-003640
3641 Elite Food & Grocery Product Advanced Food & Grocery $725.76 410 2.0 519 SKU-003641
3642 Pro Office Supplies Product Pro Office Supplies $486.18 372 2.7 437 SKU-003642
3643 Deluxe Health & Beauty Product Lite Health & Beauty $611.39 360 4.2 662 SKU-003643
3644 Professional Books Product Classic Books $336.28 210 4.2 407 SKU-003644
3645 Elite Electronics Product Lite Electronics $748.50 389 1.3 215 SKU-003645
3646 Elite Clothing Product Plus Clothing $375.39 488 2.2 583 SKU-003646
3647 Standard Books Product Plus Books $20.64 19 3.0 109 SKU-003647
3650 Elite Food & Grocery Product 2024 Food & Grocery $717.76 154 1.5 687 SKU-003650
3651 Mega Clothing Product Classic Clothing $728.15 296 3.8 44 SKU-003651
3652 Elite Food & Grocery Product XL Food & Grocery $770.19 58 4.6 289 SKU-003652
3653 Standard Sports & Outdoors Product Plus Sports & Outdoors $757.34 9 2.2 154 SKU-003653
3654 Ultra Books Product Lite Books $609.19 310 3.9 681 SKU-003654
3655 Ultra Sports & Outdoors Product Lite Sports & Outdoors $936.16 226 2.4 988 SKU-003655
3656 Elite Automotive Product Classic Automotive $294.02 136 4.1 152 SKU-003656
3657 Pro Food & Grocery Product Classic Food & Grocery $152.59 175 2.1 491 SKU-003657
3658 Elite Electronics Product Lite Electronics $990.84 327 3.8 985 SKU-003658
3659 Standard Clothing Product 2024 Clothing $487.98 456 4.1 25 SKU-003659
3660 Mega Health & Beauty Product XL Health & Beauty $565.79 492 3.3 252 SKU-003660
3661 Elite Food & Grocery Product 2024 Food & Grocery $727.93 325 1.7 501 SKU-003661
3662 Super Home & Garden Product Mini Home & Garden $734.87 273 4.8 872 SKU-003662
3663 Ultra Automotive Product Mini Automotive $408.77 300 2.7 190 SKU-003663
3664 Deluxe Books Product 2024 Books $98.29 143 3.8 460 SKU-003664
3665 Elite Health & Beauty Product XL Health & Beauty $524.93 196 1.4 256 SKU-003665
3666 Economy Health & Beauty Product 2024 Health & Beauty $349.88 353 2.0 563 SKU-003666
3667 Elite Toys & Games Product Pro Toys & Games $858.05 0 2.2 907 SKU-003667
3668 Pro Toys & Games Product Lite Toys & Games $653.52 483 2.4 210 SKU-003668
3669 Mega Books Product Lite Books $465.80 172 2.7 945 SKU-003669
3670 Professional Sports & Outdoors Product Special Edition Sports & Outdoors $679.22 72 4.5 253 SKU-003670
3671 Standard Clothing Product Plus Clothing $905.69 285 4.9 324 SKU-003671
3672 Elite Office Supplies Product Pro Office Supplies $981.66 106 3.6 472 SKU-003672
3673 Elite Toys & Games Product Lite Toys & Games $321.03 437 4.0 224 SKU-003673
3674 Super Health & Beauty Product XL Health & Beauty $192.54 43 1.4 983 SKU-003674
3675 Premium Sports & Outdoors Product Special Edition Sports & Outdoors $547.61 34 3.9 3 SKU-003675
3676 Standard Office Supplies Product Advanced Office Supplies $581.59 214 2.7 669 SKU-003676
3677 Standard Sports & Outdoors Product XL Sports & Outdoors $532.20 299 3.7 266 SKU-003677
3678 Super Sports & Outdoors Product 2024 Sports & Outdoors $104.21 452 4.7 523 SKU-003678
3679 Mega Electronics Product Special Edition Electronics $280.13 255 2.2 844 SKU-003679
3680 Professional Home & Garden Product 2024 Home & Garden $906.15 284 4.9 2 SKU-003680
3681 Economy Toys & Games Product XL Toys & Games $41.20 449 1.5 750 SKU-003681
3682 Economy Home & Garden Product Max Home & Garden $950.60 373 2.9 918 SKU-003682
3683 Premium Home & Garden Product Pro Home & Garden $55.72 31 2.5 792 SKU-003683
3684 Super Books Product Lite Books $285.13 123 5.0 617 SKU-003684
3685 Premium Sports & Outdoors Product Pro Sports & Outdoors $337.90 447 3.5 488 SKU-003685
3686 Elite Clothing Product Lite Clothing $651.35 55 1.9 589 SKU-003686
3687 Elite Office Supplies Product Special Edition Office Supplies $447.50 31 4.7 661 SKU-003687
3688 Mega Sports & Outdoors Product Mini Sports & Outdoors $753.19 175 4.5 762 SKU-003688
3689 Pro Electronics Product Mini Electronics $937.09 476 1.1 933 SKU-003689
3690 Standard Clothing Product Pro Clothing $893.42 79 2.0 52 SKU-003690
3691 Elite Sports & Outdoors Product Pro Sports & Outdoors $948.42 7 4.9 928 SKU-003691
3693 Ultra Books Product Max Books $923.36 330 4.5 506 SKU-003693
3694 Premium Books Product Plus Books $620.34 358 2.2 348 SKU-003694
3695 Standard Health & Beauty Product Special Edition Health & Beauty $356.06 411 2.8 513 SKU-003695
3696 Standard Electronics Product 2024 Electronics $327.81 399 3.6 165 SKU-003696
3697 Elite Sports & Outdoors Product Pro Sports & Outdoors $933.23 100 1.8 481 SKU-003697
3698 Pro Toys & Games Product Plus Toys & Games $709.92 103 3.8 219 SKU-003698
3699 Ultra Toys & Games Product Max Toys & Games $796.40 334 1.5 607 SKU-003699
3700 Elite Electronics Product Advanced Electronics $166.99 137 3.8 111 SKU-003700
3701 Premium Office Supplies Product Pro Office Supplies $980.48 15 2.7 593 SKU-003701
3702 Premium Automotive Product Plus Automotive $570.47 474 2.5 634 SKU-003702
3703 Pro Food & Grocery Product XL Food & Grocery $86.91 54 3.6 921 SKU-003703
3705 Professional Clothing Product Advanced Clothing $677.70 410 3.0 739 SKU-003705
3706 Mega Automotive Product Plus Automotive $584.86 483 2.4 118 SKU-003706
3707 Elite Food & Grocery Product XL Food & Grocery $465.72 410 1.3 811 SKU-003707
3708 Elite Office Supplies Product Max Office Supplies $777.46 80 2.6 166 SKU-003708
3709 Ultra Electronics Product Pro Electronics $281.73 417 2.9 967 SKU-003709
3710 Mega Automotive Product Plus Automotive $903.15 34 1.7 282 SKU-003710
3711 Elite Automotive Product Advanced Automotive $525.67 195 2.6 439 SKU-003711
3712 Ultra Automotive Product Lite Automotive $836.18 434 3.5 998 SKU-003712
3713 Ultra Home & Garden Product Advanced Home & Garden $780.15 319 4.9 608 SKU-003713
3714 Deluxe Toys & Games Product Pro Toys & Games $747.44 178 4.4 209 SKU-003714
3715 Standard Sports & Outdoors Product Mini Sports & Outdoors $423.03 323 2.9 749 SKU-003715
3716 Ultra Sports & Outdoors Product Pro Sports & Outdoors $551.26 229 2.6 219 SKU-003716
3717 Super Electronics Product Special Edition Electronics $123.10 147 4.7 211 SKU-003717
3718 Elite Books Product Max Books $582.01 285 2.1 698 SKU-003718
3719 Standard Food & Grocery Product 2024 Food & Grocery $428.01 236 1.7 625 SKU-003719
3720 Elite Office Supplies Product Lite Office Supplies $872.10 42 2.3 5 SKU-003720
3721 Deluxe Office Supplies Product Max Office Supplies $828.00 75 3.4 807 SKU-003721
3722 Super Office Supplies Product Max Office Supplies $126.95 262 1.1 121 SKU-003722
3723 Standard Automotive Product XL Automotive $632.29 299 4.5 13 SKU-003723
3724 Super Automotive Product 2024 Automotive $940.22 307 1.4 440 SKU-003724
3725 Ultra Clothing Product Plus Clothing $500.10 192 4.3 811 SKU-003725
3726 Pro Health & Beauty Product XL Health & Beauty $210.64 119 1.2 797 SKU-003726
3727 Elite Clothing Product Classic Clothing $616.33 490 1.8 464 SKU-003727
3728 Deluxe Automotive Product Mini Automotive $867.12 356 1.9 678 SKU-003728
3730 Pro Food & Grocery Product Lite Food & Grocery $572.94 116 4.1 253 SKU-003730
3731 Pro Food & Grocery Product XL Food & Grocery $489.82 30 4.2 377 SKU-003731
3733 Standard Health & Beauty Product Special Edition Health & Beauty $245.68 443 4.3 383 SKU-003733
3734 Ultra Office Supplies Product Max Office Supplies $227.76 292 1.8 227 SKU-003734
3735 Standard Office Supplies Product Plus Office Supplies $520.12 141 1.7 118 SKU-003735
3736 Professional Sports & Outdoors Product Special Edition Sports & Outdoors $637.90 217 4.6 967 SKU-003736
3737 Elite Clothing Product Pro Clothing $145.20 238 4.0 540 SKU-003737
3738 Deluxe Electronics Product Special Edition Electronics $61.11 491 3.7 705 SKU-003738
3739 Ultra Toys & Games Product Advanced Toys & Games $483.94 325 2.6 851 SKU-003739
3740 Economy Office Supplies Product Max Office Supplies $392.97 122 2.5 182 SKU-003740
3741 Elite Health & Beauty Product Plus Health & Beauty $859.51 117 2.8 915 SKU-003741
3742 Premium Office Supplies Product Max Office Supplies $72.42 465 1.6 171 SKU-003742
3743 Super Home & Garden Product Max Home & Garden $370.84 181 1.6 900 SKU-003743
3744 Mega Electronics Product Lite Electronics $314.80 161 3.5 838 SKU-003744
3745 Pro Health & Beauty Product Advanced Health & Beauty $39.73 90 1.5 198 SKU-003745
3746 Elite Health & Beauty Product Plus Health & Beauty $563.58 300 1.8 252 SKU-003746
3747 Standard Office Supplies Product XL Office Supplies $296.43 411 4.9 515 SKU-003747
3748 Ultra Health & Beauty Product Pro Health & Beauty $149.15 431 2.4 773 SKU-003748
3749 Standard Toys & Games Product Lite Toys & Games $546.02 444 1.3 478 SKU-003749
3750 Professional Electronics Product Advanced Electronics $207.91 371 2.9 626 SKU-003750
3751 Economy Health & Beauty Product Special Edition Health & Beauty $815.48 160 4.2 385 SKU-003751
3752 Economy Office Supplies Product Max Office Supplies $119.35 18 1.4 21 SKU-003752
3753 Economy Health & Beauty Product Mini Health & Beauty $840.86 432 1.9 573 SKU-003753
3754 Professional Clothing Product Special Edition Clothing $328.08 46 2.5 695 SKU-003754
3755 Economy Books Product Lite Books $212.92 467 4.4 701 SKU-003755
3756 Mega Sports & Outdoors Product Mini Sports & Outdoors $525.66 471 2.8 851 SKU-003756
3757 Deluxe Automotive Product Classic Automotive $980.32 219 3.2 246 SKU-003757
3759 Super Office Supplies Product Classic Office Supplies $204.31 439 1.8 963 SKU-003759
3760 Standard Electronics Product Pro Electronics $636.43 300 4.4 924 SKU-003760
3764 Mega Electronics Product Classic Electronics $130.72 238 4.9 477 SKU-003764
3765 Pro Electronics Product Plus Electronics $835.41 203 3.8 481 SKU-003765
3767 Economy Automotive Product 2024 Automotive $899.64 222 4.1 420 SKU-003767
3769 Professional Sports & Outdoors Product XL Sports & Outdoors $615.80 333 2.8 409 SKU-003769
3770 Standard Toys & Games Product Mini Toys & Games $461.80 499 2.8 326 SKU-003770
3772 Pro Electronics Product Pro Electronics $308.59 398 3.9 508 SKU-003772
3773 Deluxe Automotive Product Plus Automotive $709.56 343 2.4 890 SKU-003773
3774 Super Sports & Outdoors Product Max Sports & Outdoors $590.34 261 4.0 40 SKU-003774
3775 Premium Clothing Product Max Clothing $548.85 236 3.9 587 SKU-003775
3777 Super Health & Beauty Product Pro Health & Beauty $759.85 296 1.5 675 SKU-003777
3779 Standard Sports & Outdoors Product Pro Sports & Outdoors $458.41 439 1.2 179 SKU-003779
3780 Elite Automotive Product Lite Automotive $316.28 71 3.2 727 SKU-003780
3783 Super Books Product Max Books $405.42 47 2.7 312 SKU-003783
3784 Mega Office Supplies Product Special Edition Office Supplies $885.15 136 2.9 572 SKU-003784
3785 Super Food & Grocery Product Lite Food & Grocery $512.64 234 4.6 84 SKU-003785
3786 Mega Office Supplies Product Plus Office Supplies $500.01 53 3.1 488 SKU-003786
3787 Ultra Office Supplies Product Lite Office Supplies $399.84 220 2.0 879 SKU-003787
3788 Economy Office Supplies Product 2024 Office Supplies $281.86 462 4.9 742 SKU-003788
3789 Premium Food & Grocery Product Mini Food & Grocery $605.81 10 1.9 675 SKU-003789
3790 Premium Clothing Product Classic Clothing $906.33 113 4.1 677 SKU-003790
3791 Ultra Office Supplies Product Advanced Office Supplies $285.07 405 1.7 894 SKU-003791
3792 Ultra Toys & Games Product 2024 Toys & Games $391.34 457 2.2 343 SKU-003792
3793 Professional Toys & Games Product Pro Toys & Games $188.86 399 4.8 344 SKU-003793
3794 Premium Toys & Games Product Special Edition Toys & Games $948.36 328 3.8 789 SKU-003794
3795 Deluxe Clothing Product XL Clothing $127.50 474 1.9 982 SKU-003795
3796 Mega Books Product Special Edition Books $568.16 294 2.8 605 SKU-003796
3797 Ultra Home & Garden Product Advanced Home & Garden $173.09 354 5.0 633 SKU-003797
3798 Deluxe Office Supplies Product Advanced Office Supplies $270.02 303 1.9 159 SKU-003798
3799 Premium Automotive Product Pro Automotive $412.88 246 1.0 464 SKU-003799
3800 Professional Books Product 2024 Books $253.84 444 2.5 290 SKU-003800
3801 Standard Automotive Product Special Edition Automotive $271.97 264 2.2 978 SKU-003801
3802 Standard Office Supplies Product Pro Office Supplies $319.29 92 1.8 184 SKU-003802
3803 Standard Food & Grocery Product XL Food & Grocery $18.73 414 4.5 563 SKU-003803
3804 Standard Sports & Outdoors Product Classic Sports & Outdoors $477.55 199 3.8 351 SKU-003804
3805 Professional Clothing Product Mini Clothing $992.70 266 2.6 181 SKU-003805
3806 Ultra Clothing Product Max Clothing $809.90 71 1.7 33 SKU-003806
3807 Super Books Product Mini Books $22.80 126 2.1 558 SKU-003807
3808 Ultra Toys & Games Product Max Toys & Games $95.40 224 3.9 771 SKU-003808
3809 Economy Food & Grocery Product Classic Food & Grocery $149.29 104 3.2 895 SKU-003809
3810 Economy Clothing Product Lite Clothing $637.25 316 4.3 231 SKU-003810
3811 Premium Toys & Games Product XL Toys & Games $850.84 194 3.4 254 SKU-003811
3812 Pro Health & Beauty Product Classic Health & Beauty $378.03 223 3.6 237 SKU-003812
3813 Pro Toys & Games Product Plus Toys & Games $736.45 154 4.5 918 SKU-003813
3814 Standard Clothing Product Pro Clothing $197.02 368 2.0 449 SKU-003814
3815 Standard Health & Beauty Product Classic Health & Beauty $742.74 384 4.1 11 SKU-003815
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