Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

9 ms

Page Size

200

Current Page

4 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 4 Results Showing 601 - 800 of 24441

ID Name Category Price Stock Rating Reviews SKU
674 Pro Automotive Product Lite Automotive $740.79 456 3.3 438 SKU-000674
675 Deluxe Office Supplies Product Classic Office Supplies $628.28 66 4.6 928 SKU-000675
676 Elite Toys & Games Product Classic Toys & Games $746.25 116 3.8 446 SKU-000676
677 Premium Home & Garden Product Advanced Home & Garden $38.46 434 3.1 867 SKU-000677
678 Professional Office Supplies Product Max Office Supplies $691.40 445 2.9 347 SKU-000678
679 Ultra Automotive Product XL Automotive $69.14 170 1.3 955 SKU-000679
680 Elite Sports & Outdoors Product Lite Sports & Outdoors $321.22 268 1.5 765 SKU-000680
682 Standard Food & Grocery Product Max Food & Grocery $951.89 160 1.2 942 SKU-000682
684 Premium Books Product Lite Books $753.18 472 3.8 736 SKU-000684
685 Elite Office Supplies Product Advanced Office Supplies $842.57 21 1.1 432 SKU-000685
686 Standard Home & Garden Product Lite Home & Garden $975.48 196 3.3 793 SKU-000686
687 Super Office Supplies Product Mini Office Supplies $455.36 244 4.1 322 SKU-000687
688 Professional Home & Garden Product Lite Home & Garden $214.61 341 3.1 380 SKU-000688
689 Elite Office Supplies Product Lite Office Supplies $735.13 78 2.8 894 SKU-000689
690 Elite Sports & Outdoors Product Special Edition Sports & Outdoors $510.16 369 3.0 113 SKU-000690
691 Standard Automotive Product Max Automotive $920.42 370 1.6 877 SKU-000691
692 Professional Electronics Product Classic Electronics $507.53 317 4.9 858 SKU-000692
693 Premium Health & Beauty Product Pro Health & Beauty $893.92 152 3.2 89 SKU-000693
694 Deluxe Health & Beauty Product Advanced Health & Beauty $114.78 410 2.9 630 SKU-000694
695 Standard Books Product Plus Books $897.17 409 1.1 167 SKU-000695
696 Ultra Electronics Product Mini Electronics $542.62 80 1.2 331 SKU-000696
697 Standard Home & Garden Product Lite Home & Garden $464.53 43 2.7 566 SKU-000697
698 Economy Books Product Max Books $742.20 349 3.5 293 SKU-000698
699 Super Books Product Special Edition Books $217.40 135 3.4 465 SKU-000699
700 Mega Clothing Product Classic Clothing $232.79 231 3.7 782 SKU-000700
701 Ultra Electronics Product Advanced Electronics $143.87 180 1.5 980 SKU-000701
702 Ultra Automotive Product Plus Automotive $456.45 359 2.2 518 SKU-000702
703 Pro Electronics Product Pro Electronics $526.63 409 3.8 858 SKU-000703
704 Elite Electronics Product XL Electronics $844.16 493 3.1 714 SKU-000704
705 Mega Toys & Games Product Plus Toys & Games $874.13 436 2.5 566 SKU-000705
707 Mega Office Supplies Product Pro Office Supplies $189.54 463 1.0 169 SKU-000707
708 Ultra Toys & Games Product Advanced Toys & Games $233.66 76 4.8 709 SKU-000708
709 Ultra Toys & Games Product Advanced Toys & Games $825.67 380 1.3 714 SKU-000709
710 Premium Electronics Product XL Electronics $75.94 110 3.5 450 SKU-000710
711 Elite Sports & Outdoors Product Plus Sports & Outdoors $591.34 238 2.8 631 SKU-000711
712 Elite Electronics Product Lite Electronics $121.43 7 4.4 518 SKU-000712
713 Ultra Health & Beauty Product Plus Health & Beauty $132.72 495 3.2 699 SKU-000713
714 Ultra Sports & Outdoors Product 2024 Sports & Outdoors $722.71 317 4.1 855 SKU-000714
715 Super Home & Garden Product XL Home & Garden $442.54 278 3.9 125 SKU-000715
716 Professional Books Product Mini Books $990.24 332 2.3 934 SKU-000716
717 Super Automotive Product Special Edition Automotive $549.44 215 4.4 649 SKU-000717
718 Pro Books Product Lite Books $715.86 315 1.3 808 SKU-000718
719 Standard Clothing Product Max Clothing $634.33 356 2.9 26 SKU-000719
720 Ultra Office Supplies Product Classic Office Supplies $936.60 17 3.8 605 SKU-000720
721 Professional Health & Beauty Product Classic Health & Beauty $906.89 24 4.7 613 SKU-000721
722 Standard Sports & Outdoors Product Pro Sports & Outdoors $369.30 70 3.4 176 SKU-000722
723 Pro Sports & Outdoors Product Pro Sports & Outdoors $647.19 47 4.4 499 SKU-000723
724 Deluxe Books Product Mini Books $776.85 194 1.5 781 SKU-000724
725 Premium Electronics Product Classic Electronics $957.98 278 3.0 76 SKU-000725
726 Ultra Clothing Product Classic Clothing $834.43 58 4.3 244 SKU-000726
727 Deluxe Toys & Games Product Mini Toys & Games $422.17 41 1.4 392 SKU-000727
729 Economy Books Product 2024 Books $799.51 363 1.4 858 SKU-000729
730 Standard Food & Grocery Product Mini Food & Grocery $88.06 276 4.5 14 SKU-000730
731 Premium Food & Grocery Product Max Food & Grocery $239.27 168 2.0 234 SKU-000731
732 Economy Home & Garden Product 2024 Home & Garden $328.53 104 4.1 509 SKU-000732
733 Pro Health & Beauty Product XL Health & Beauty $77.74 209 4.4 283 SKU-000733
734 Pro Food & Grocery Product Mini Food & Grocery $856.73 175 4.6 34 SKU-000734
735 Super Electronics Product Special Edition Electronics $899.40 432 3.4 535 SKU-000735
736 Ultra Clothing Product Lite Clothing $621.71 177 4.7 191 SKU-000736
737 Mega Office Supplies Product Advanced Office Supplies $650.13 169 1.9 950 SKU-000737
738 Pro Electronics Product Mini Electronics $164.42 389 4.4 243 SKU-000738
739 Standard Books Product Classic Books $101.76 365 4.8 574 SKU-000739
741 Elite Toys & Games Product XL Toys & Games $314.85 382 4.4 637 SKU-000741
743 Economy Food & Grocery Product Max Food & Grocery $174.03 21 1.1 300 SKU-000743
744 Standard Automotive Product Pro Automotive $897.17 62 1.2 488 SKU-000744
745 Professional Books Product Pro Books $951.08 248 1.2 932 SKU-000745
746 Premium Electronics Product Mini Electronics $187.07 122 2.8 234 SKU-000746
747 Mega Health & Beauty Product Advanced Health & Beauty $965.03 268 4.9 677 SKU-000747
748 Deluxe Office Supplies Product Classic Office Supplies $764.80 499 1.1 49 SKU-000748
749 Professional Automotive Product Plus Automotive $235.66 43 1.9 385 SKU-000749
750 Mega Clothing Product Special Edition Clothing $649.42 437 4.2 225 SKU-000750
751 Professional Health & Beauty Product Special Edition Health & Beauty $36.61 405 4.6 970 SKU-000751
752 Deluxe Books Product Plus Books $911.02 341 4.8 934 SKU-000752
753 Mega Health & Beauty Product Plus Health & Beauty $224.12 5 2.9 863 SKU-000753
754 Pro Electronics Product Special Edition Electronics $384.02 95 1.0 147 SKU-000754
756 Professional Food & Grocery Product XL Food & Grocery $915.47 355 2.1 458 SKU-000756
757 Mega Toys & Games Product XL Toys & Games $34.26 22 1.6 714 SKU-000757
758 Super Books Product Lite Books $288.77 97 4.0 752 SKU-000758
759 Deluxe Clothing Product Special Edition Clothing $556.44 223 4.6 653 SKU-000759
760 Deluxe Automotive Product Special Edition Automotive $569.15 112 1.2 35 SKU-000760
761 Standard Food & Grocery Product Advanced Food & Grocery $54.26 454 4.6 885 SKU-000761
762 Super Food & Grocery Product 2024 Food & Grocery $412.20 24 3.2 578 SKU-000762
763 Premium Clothing Product Lite Clothing $881.56 156 3.3 61 SKU-000763
764 Deluxe Automotive Product Plus Automotive $246.78 165 4.7 77 SKU-000764
765 Economy Health & Beauty Product Plus Health & Beauty $409.97 434 1.1 777 SKU-000765
766 Standard Automotive Product Special Edition Automotive $905.73 474 3.5 76 SKU-000766
767 Economy Clothing Product Plus Clothing $386.34 104 4.9 387 SKU-000767
768 Elite Sports & Outdoors Product XL Sports & Outdoors $283.12 257 4.2 520 SKU-000768
769 Economy Clothing Product 2024 Clothing $474.44 283 2.3 440 SKU-000769
770 Professional Books Product Special Edition Books $930.22 488 2.2 582 SKU-000770
771 Standard Automotive Product Pro Automotive $336.73 380 2.3 931 SKU-000771
773 Mega Clothing Product Plus Clothing $962.22 222 3.4 363 SKU-000773
774 Professional Electronics Product Pro Electronics $219.68 318 3.7 948 SKU-000774
775 Elite Home & Garden Product Lite Home & Garden $275.64 401 2.9 640 SKU-000775
776 Super Home & Garden Product Mini Home & Garden $875.13 18 3.2 939 SKU-000776
777 Pro Toys & Games Product Mini Toys & Games $638.31 338 3.4 330 SKU-000777
778 Premium Food & Grocery Product XL Food & Grocery $259.19 170 4.7 784 SKU-000778
780 Professional Toys & Games Product Lite Toys & Games $621.92 198 3.8 629 SKU-000780
781 Elite Home & Garden Product Mini Home & Garden $724.33 28 1.6 911 SKU-000781
782 Economy Food & Grocery Product Plus Food & Grocery $836.40 66 1.4 719 SKU-000782
783 Mega Health & Beauty Product Lite Health & Beauty $219.58 485 2.8 226 SKU-000783
784 Ultra Home & Garden Product Classic Home & Garden $855.13 198 1.3 784 SKU-000784
786 Standard Home & Garden Product XL Home & Garden $546.83 379 2.2 682 SKU-000786
787 Professional Office Supplies Product Max Office Supplies $185.32 193 2.0 4 SKU-000787
788 Elite Toys & Games Product Mini Toys & Games $807.85 218 2.5 925 SKU-000788
789 Pro Books Product Classic Books $124.82 287 2.8 990 SKU-000789
790 Professional Books Product Lite Books $755.88 56 2.0 381 SKU-000790
791 Economy Books Product Lite Books $25.30 468 4.3 745 SKU-000791
792 Pro Books Product Advanced Books $354.79 455 4.3 870 SKU-000792
793 Deluxe Home & Garden Product Max Home & Garden $654.85 225 4.8 223 SKU-000793
795 Professional Sports & Outdoors Product Special Edition Sports & Outdoors $858.71 405 1.9 814 SKU-000795
796 Mega Toys & Games Product Max Toys & Games $28.48 455 3.0 615 SKU-000796
797 Deluxe Books Product Classic Books $635.08 22 4.0 810 SKU-000797
798 Professional Health & Beauty Product Plus Health & Beauty $49.30 339 2.2 986 SKU-000798
799 Pro Home & Garden Product Lite Home & Garden $477.84 234 4.0 322 SKU-000799
801 Premium Clothing Product Classic Clothing $121.17 57 4.8 23 SKU-000801
802 Mega Automotive Product Max Automotive $819.72 162 1.3 808 SKU-000802
804 Pro Home & Garden Product Plus Home & Garden $862.50 293 3.3 409 SKU-000804
805 Mega Books Product Classic Books $218.06 271 4.1 244 SKU-000805
806 Super Health & Beauty Product Mini Health & Beauty $626.82 419 3.1 854 SKU-000806
807 Super Automotive Product Pro Automotive $947.77 25 3.7 998 SKU-000807
808 Economy Electronics Product Special Edition Electronics $142.20 472 2.8 811 SKU-000808
809 Elite Toys & Games Product Max Toys & Games $22.81 200 3.2 804 SKU-000809
810 Professional Food & Grocery Product Special Edition Food & Grocery $53.88 190 3.0 73 SKU-000810
811 Ultra Toys & Games Product Advanced Toys & Games $446.85 408 5.0 341 SKU-000811
812 Mega Office Supplies Product Max Office Supplies $469.87 121 2.7 158 SKU-000812
813 Pro Clothing Product Classic Clothing $870.46 164 4.6 13 SKU-000813
815 Professional Automotive Product Mini Automotive $725.69 384 3.9 870 SKU-000815
816 Mega Office Supplies Product Special Edition Office Supplies $571.90 414 2.9 779 SKU-000816
817 Economy Health & Beauty Product 2024 Health & Beauty $319.38 45 2.0 989 SKU-000817
818 Pro Electronics Product Pro Electronics $83.81 189 1.2 780 SKU-000818
819 Professional Automotive Product Pro Automotive $493.98 29 4.2 436 SKU-000819
820 Elite Books Product Mini Books $919.07 483 3.4 148 SKU-000820
822 Mega Automotive Product Max Automotive $88.75 104 3.1 563 SKU-000822
823 Standard Electronics Product 2024 Electronics $44.77 426 3.7 90 SKU-000823
824 Deluxe Electronics Product Advanced Electronics $198.15 125 3.4 703 SKU-000824
825 Pro Books Product Plus Books $726.05 198 3.8 894 SKU-000825
826 Premium Office Supplies Product XL Office Supplies $510.94 54 1.8 690 SKU-000826
827 Pro Electronics Product XL Electronics $552.60 427 2.4 401 SKU-000827
828 Ultra Electronics Product 2024 Electronics $481.04 97 2.5 180 SKU-000828
829 Pro Food & Grocery Product Pro Food & Grocery $833.59 100 3.6 61 SKU-000829
830 Elite Health & Beauty Product Classic Health & Beauty $192.43 233 2.7 595 SKU-000830
831 Elite Home & Garden Product Lite Home & Garden $408.75 18 1.9 286 SKU-000831
832 Mega Health & Beauty Product Max Health & Beauty $618.57 409 3.5 567 SKU-000832
833 Mega Electronics Product 2024 Electronics $855.19 388 4.0 440 SKU-000833
834 Professional Clothing Product Special Edition Clothing $172.10 253 3.4 683 SKU-000834
835 Economy Toys & Games Product Mini Toys & Games $613.68 309 3.8 803 SKU-000835
836 Elite Books Product Pro Books $675.29 487 2.8 787 SKU-000836
837 Elite Toys & Games Product Pro Toys & Games $533.92 130 2.6 227 SKU-000837
838 Premium Clothing Product Pro Clothing $986.81 263 5.0 820 SKU-000838
839 Standard Food & Grocery Product Advanced Food & Grocery $223.92 445 1.7 878 SKU-000839
840 Premium Food & Grocery Product Plus Food & Grocery $449.92 457 2.4 222 SKU-000840
841 Mega Office Supplies Product Advanced Office Supplies $431.00 53 1.1 310 SKU-000841
843 Mega Automotive Product Plus Automotive $764.71 412 3.3 17 SKU-000843
844 Premium Office Supplies Product Max Office Supplies $585.81 281 4.0 660 SKU-000844
845 Premium Automotive Product Advanced Automotive $214.94 233 3.2 282 SKU-000845
846 Ultra Electronics Product XL Electronics $584.53 140 2.0 930 SKU-000846
848 Pro Food & Grocery Product Special Edition Food & Grocery $986.07 234 4.0 353 SKU-000848
849 Mega Office Supplies Product Classic Office Supplies $590.15 499 2.0 465 SKU-000849
850 Standard Food & Grocery Product Plus Food & Grocery $714.12 226 2.1 655 SKU-000850
851 Premium Sports & Outdoors Product Advanced Sports & Outdoors $825.79 135 1.1 151 SKU-000851
852 Deluxe Toys & Games Product Pro Toys & Games $448.83 74 1.6 895 SKU-000852
853 Mega Food & Grocery Product Mini Food & Grocery $212.90 225 2.6 39 SKU-000853
854 Pro Electronics Product Pro Electronics $885.10 193 1.4 683 SKU-000854
855 Premium Electronics Product Advanced Electronics $873.54 80 1.3 461 SKU-000855
856 Deluxe Toys & Games Product 2024 Toys & Games $103.23 61 4.2 159 SKU-000856
857 Mega Toys & Games Product 2024 Toys & Games $75.73 398 3.7 0 SKU-000857
858 Pro Health & Beauty Product 2024 Health & Beauty $810.19 313 2.1 540 SKU-000858
859 Economy Electronics Product Pro Electronics $683.35 236 1.5 887 SKU-000859
860 Super Toys & Games Product Max Toys & Games $285.37 468 1.7 274 SKU-000860
861 Pro Office Supplies Product Lite Office Supplies $915.80 201 3.5 968 SKU-000861
862 Super Books Product XL Books $261.38 78 1.9 257 SKU-000862
864 Professional Books Product Plus Books $942.17 133 2.0 907 SKU-000864
865 Elite Food & Grocery Product 2024 Food & Grocery $485.21 264 2.6 170 SKU-000865
866 Pro Clothing Product 2024 Clothing $838.96 38 1.1 574 SKU-000866
867 Professional Clothing Product Advanced Clothing $14.88 395 3.1 215 SKU-000867
868 Standard Clothing Product Max Clothing $325.03 98 4.4 391 SKU-000868
869 Premium Sports & Outdoors Product Mini Sports & Outdoors $11.66 382 2.6 573 SKU-000869
870 Elite Books Product Mini Books $314.88 437 1.1 122 SKU-000870
871 Economy Clothing Product Special Edition Clothing $321.96 358 1.8 863 SKU-000871
872 Deluxe Home & Garden Product Classic Home & Garden $650.05 309 3.4 31 SKU-000872
874 Standard Office Supplies Product Plus Office Supplies $798.82 275 1.7 412 SKU-000874
875 Deluxe Food & Grocery Product XL Food & Grocery $115.11 142 2.4 341 SKU-000875
876 Economy Sports & Outdoors Product Classic Sports & Outdoors $920.67 484 4.7 526 SKU-000876
877 Professional Automotive Product Plus Automotive $326.52 9 2.1 22 SKU-000877
878 Elite Toys & Games Product XL Toys & Games $940.28 21 3.8 284 SKU-000878
879 Elite Clothing Product Plus Clothing $452.39 216 1.3 75 SKU-000879
880 Standard Home & Garden Product XL Home & Garden $665.48 414 4.8 71 SKU-000880
881 Professional Electronics Product Lite Electronics $487.59 308 5.0 730 SKU-000881
882 Economy Home & Garden Product Plus Home & Garden $562.90 140 2.3 200 SKU-000882
883 Deluxe Electronics Product 2024 Electronics $842.38 149 2.9 164 SKU-000883
884 Economy Electronics Product XL Electronics $761.68 484 2.6 35 SKU-000884
886 Deluxe Toys & Games Product Max Toys & Games $856.26 167 1.4 314 SKU-000886
887 Economy Sports & Outdoors Product XL Sports & Outdoors $831.35 125 3.1 59 SKU-000887
888 Super Toys & Games Product Classic Toys & Games $385.08 348 3.6 908 SKU-000888
889 Mega Home & Garden Product Special Edition Home & Garden $387.25 367 1.4 616 SKU-000889
890 Super Sports & Outdoors Product Advanced Sports & Outdoors $785.38 275 1.7 866 SKU-000890
891 Economy Food & Grocery Product Advanced Food & Grocery $855.25 127 3.4 734 SKU-000891
892 Standard Food & Grocery Product Classic Food & Grocery $284.89 277 4.0 557 SKU-000892
893 Elite Food & Grocery Product Max Food & Grocery $843.26 379 2.0 920 SKU-000893
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