Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

29 ms

Page Size

200

Current Page

8 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 8 Results Showing 1401 - 1600 of 24441

ID Name Category Price Stock Rating Reviews SKU
1591 Professional Electronics Product Classic Electronics $314.21 367 3.6 639 SKU-001591
1592 Elite Books Product Pro Books $86.76 148 4.4 828 SKU-001592
1593 Super Sports & Outdoors Product Special Edition Sports & Outdoors $938.66 460 2.0 102 SKU-001593
1594 Economy Electronics Product Special Edition Electronics $572.30 94 4.9 616 SKU-001594
1595 Pro Electronics Product Mini Electronics $99.50 15 5.0 160 SKU-001595
1596 Ultra Health & Beauty Product Mini Health & Beauty $639.09 56 4.5 684 SKU-001596
1597 Economy Home & Garden Product Advanced Home & Garden $979.91 441 2.9 90 SKU-001597
1598 Premium Health & Beauty Product Mini Health & Beauty $785.69 73 1.4 377 SKU-001598
1599 Professional Electronics Product Classic Electronics $992.66 37 3.7 100 SKU-001599
1601 Standard Toys & Games Product Classic Toys & Games $214.65 353 2.1 641 SKU-001601
1602 Economy Toys & Games Product Advanced Toys & Games $706.45 150 2.4 381 SKU-001602
1603 Super Automotive Product Lite Automotive $156.29 440 1.2 706 SKU-001603
1605 Standard Food & Grocery Product Plus Food & Grocery $710.01 322 3.1 65 SKU-001605
1606 Premium Automotive Product Max Automotive $638.05 90 2.9 523 SKU-001606
1607 Pro Office Supplies Product Plus Office Supplies $717.60 41 2.5 876 SKU-001607
1608 Economy Automotive Product Max Automotive $84.06 329 1.5 672 SKU-001608
1609 Super Clothing Product Lite Clothing $518.98 78 2.2 49 SKU-001609
1610 Mega Books Product Special Edition Books $63.80 361 3.4 297 SKU-001610
1611 Ultra Home & Garden Product Classic Home & Garden $360.93 489 2.2 530 SKU-001611
1612 Pro Home & Garden Product Max Home & Garden $762.61 110 3.8 943 SKU-001612
1613 Mega Home & Garden Product Mini Home & Garden $838.96 186 4.0 333 SKU-001613
1614 Standard Books Product Max Books $551.45 422 2.9 172 SKU-001614
1615 Professional Electronics Product 2024 Electronics $217.56 430 2.9 63 SKU-001615
1616 Pro Books Product Advanced Books $651.50 142 3.8 263 SKU-001616
1617 Mega Food & Grocery Product Classic Food & Grocery $669.08 159 2.6 722 SKU-001617
1618 Standard Toys & Games Product Classic Toys & Games $19.79 429 1.8 575 SKU-001618
1619 Super Automotive Product Mini Automotive $159.38 86 3.6 781 SKU-001619
1620 Super Electronics Product Advanced Electronics $766.30 396 5.0 14 SKU-001620
1621 Professional Clothing Product Advanced Clothing $467.83 171 2.2 144 SKU-001621
1622 Deluxe Toys & Games Product Plus Toys & Games $420.91 441 4.2 316 SKU-001622
1624 Elite Home & Garden Product Lite Home & Garden $361.43 123 1.9 81 SKU-001624
1625 Ultra Toys & Games Product Classic Toys & Games $184.84 172 2.0 938 SKU-001625
1626 Elite Office Supplies Product Lite Office Supplies $999.35 352 1.8 509 SKU-001626
1627 Professional Toys & Games Product Mini Toys & Games $491.17 160 3.9 66 SKU-001627
1629 Elite Sports & Outdoors Product 2024 Sports & Outdoors $335.47 289 2.7 114 SKU-001629
1630 Mega Food & Grocery Product Advanced Food & Grocery $688.70 187 2.5 759 SKU-001630
1631 Premium Health & Beauty Product Lite Health & Beauty $495.55 247 4.4 367 SKU-001631
1632 Mega Books Product Plus Books $848.61 178 4.8 720 SKU-001632
1633 Premium Food & Grocery Product XL Food & Grocery $369.02 72 3.5 580 SKU-001633
1634 Elite Automotive Product Plus Automotive $451.92 349 3.1 323 SKU-001634
1635 Mega Office Supplies Product Mini Office Supplies $415.32 4 4.8 820 SKU-001635
1636 Deluxe Automotive Product Classic Automotive $602.73 366 2.3 691 SKU-001636
1637 Deluxe Books Product Special Edition Books $273.13 251 3.9 191 SKU-001637
1638 Professional Electronics Product Advanced Electronics $561.77 182 1.9 146 SKU-001638
1639 Super Toys & Games Product Pro Toys & Games $334.32 311 2.2 279 SKU-001639
1640 Economy Food & Grocery Product XL Food & Grocery $314.31 8 4.5 377 SKU-001640
1641 Ultra Electronics Product Classic Electronics $196.85 48 4.2 301 SKU-001641
1642 Standard Food & Grocery Product Advanced Food & Grocery $74.48 0 3.7 243 SKU-001642
1643 Economy Food & Grocery Product Plus Food & Grocery $486.97 105 4.3 257 SKU-001643
1644 Elite Clothing Product Lite Clothing $616.91 150 3.7 826 SKU-001644
1645 Deluxe Clothing Product XL Clothing $416.91 383 4.1 529 SKU-001645
1646 Premium Sports & Outdoors Product Lite Sports & Outdoors $834.17 113 3.8 430 SKU-001646
1647 Pro Health & Beauty Product Pro Health & Beauty $789.84 188 2.1 207 SKU-001647
1648 Elite Food & Grocery Product Advanced Food & Grocery $517.66 159 4.2 842 SKU-001648
1649 Ultra Toys & Games Product 2024 Toys & Games $666.52 12 3.0 329 SKU-001649
1650 Economy Automotive Product Classic Automotive $533.68 233 2.1 240 SKU-001650
1651 Professional Sports & Outdoors Product Advanced Sports & Outdoors $132.33 319 2.1 514 SKU-001651
1652 Pro Clothing Product Pro Clothing $427.22 219 1.2 583 SKU-001652
1654 Premium Office Supplies Product Max Office Supplies $381.87 258 4.6 735 SKU-001654
1655 Mega Home & Garden Product Mini Home & Garden $853.53 268 4.8 374 SKU-001655
1657 Pro Books Product Special Edition Books $948.84 166 4.2 131 SKU-001657
1658 Economy Electronics Product XL Electronics $803.11 348 1.9 114 SKU-001658
1659 Ultra Electronics Product Lite Electronics $675.29 433 1.1 549 SKU-001659
1660 Deluxe Books Product Pro Books $693.17 16 2.9 152 SKU-001660
1661 Professional Toys & Games Product Plus Toys & Games $860.47 50 2.7 863 SKU-001661
1662 Economy Health & Beauty Product Pro Health & Beauty $208.75 294 2.4 52 SKU-001662
1663 Ultra Health & Beauty Product Lite Health & Beauty $133.53 343 3.9 813 SKU-001663
1664 Mega Books Product Max Books $188.64 400 2.3 404 SKU-001664
1665 Premium Electronics Product XL Electronics $437.14 265 4.4 164 SKU-001665
1666 Ultra Electronics Product Classic Electronics $768.32 415 1.5 549 SKU-001666
1668 Mega Food & Grocery Product Lite Food & Grocery $302.98 48 3.5 125 SKU-001668
1669 Ultra Books Product 2024 Books $460.63 432 1.4 709 SKU-001669
1670 Pro Clothing Product Plus Clothing $544.89 255 3.5 557 SKU-001670
1671 Ultra Toys & Games Product Pro Toys & Games $697.86 23 1.5 271 SKU-001671
1672 Professional Health & Beauty Product Max Health & Beauty $828.21 461 3.3 924 SKU-001672
1673 Deluxe Books Product Plus Books $880.31 310 4.5 682 SKU-001673
1675 Professional Automotive Product Special Edition Automotive $299.31 335 2.0 27 SKU-001675
1676 Ultra Electronics Product Max Electronics $103.90 172 4.6 227 SKU-001676
1677 Elite Health & Beauty Product Special Edition Health & Beauty $769.39 401 4.7 365 SKU-001677
1678 Super Automotive Product Pro Automotive $693.03 408 2.6 238 SKU-001678
1679 Ultra Automotive Product Lite Automotive $90.60 108 2.7 709 SKU-001679
1681 Professional Health & Beauty Product Plus Health & Beauty $98.45 26 2.3 777 SKU-001681
1682 Ultra Home & Garden Product Advanced Home & Garden $860.07 104 2.9 517 SKU-001682
1683 Deluxe Food & Grocery Product Special Edition Food & Grocery $767.40 174 1.4 760 SKU-001683
1684 Economy Office Supplies Product XL Office Supplies $909.05 458 1.4 857 SKU-001684
1685 Professional Clothing Product Max Clothing $811.61 280 2.6 675 SKU-001685
1686 Professional Home & Garden Product Plus Home & Garden $906.25 306 4.5 911 SKU-001686
1687 Super Office Supplies Product XL Office Supplies $334.75 88 3.1 607 SKU-001687
1688 Elite Automotive Product Advanced Automotive $627.97 242 3.3 217 SKU-001688
1689 Deluxe Toys & Games Product Classic Toys & Games $268.37 96 4.4 449 SKU-001689
1690 Mega Home & Garden Product Plus Home & Garden $448.97 180 2.5 889 SKU-001690
1691 Elite Health & Beauty Product Plus Health & Beauty $145.34 46 3.8 670 SKU-001691
1693 Super Toys & Games Product Max Toys & Games $391.13 245 1.8 865 SKU-001693
1694 Deluxe Books Product Classic Books $464.01 303 2.8 108 SKU-001694
1695 Deluxe Food & Grocery Product Plus Food & Grocery $61.14 180 1.8 979 SKU-001695
1696 Economy Toys & Games Product Advanced Toys & Games $79.17 236 4.6 627 SKU-001696
1697 Pro Electronics Product Special Edition Electronics $497.12 288 3.7 656 SKU-001697
1698 Standard Toys & Games Product 2024 Toys & Games $136.10 281 2.1 928 SKU-001698
1699 Premium Books Product Pro Books $86.02 49 1.7 291 SKU-001699
1700 Deluxe Health & Beauty Product Classic Health & Beauty $981.85 72 1.4 882 SKU-001700
1701 Pro Toys & Games Product Lite Toys & Games $625.61 15 1.5 439 SKU-001701
1702 Ultra Automotive Product Max Automotive $322.24 419 1.9 863 SKU-001702
1703 Mega Food & Grocery Product Advanced Food & Grocery $512.19 321 2.9 584 SKU-001703
1704 Super Home & Garden Product Mini Home & Garden $539.29 95 2.5 652 SKU-001704
1705 Professional Books Product XL Books $729.96 69 2.3 667 SKU-001705
1706 Premium Clothing Product Classic Clothing $187.90 121 4.0 474 SKU-001706
1707 Elite Electronics Product 2024 Electronics $971.47 97 3.3 694 SKU-001707
1708 Pro Home & Garden Product Pro Home & Garden $617.50 230 4.1 243 SKU-001708
1709 Mega Clothing Product Mini Clothing $948.91 425 1.8 456 SKU-001709
1710 Ultra Books Product Pro Books $284.60 353 1.6 515 SKU-001710
1711 Standard Home & Garden Product Classic Home & Garden $265.70 335 3.2 541 SKU-001711
1712 Pro Toys & Games Product Special Edition Toys & Games $550.50 138 4.0 809 SKU-001712
1713 Pro Books Product 2024 Books $96.52 59 3.7 236 SKU-001713
1714 Super Automotive Product Plus Automotive $902.71 184 4.3 330 SKU-001714
1716 Super Health & Beauty Product Max Health & Beauty $473.92 482 4.9 692 SKU-001716
1718 Elite Home & Garden Product Pro Home & Garden $328.40 25 4.2 212 SKU-001718
1719 Ultra Toys & Games Product Plus Toys & Games $723.18 200 4.3 914 SKU-001719
1720 Super Books Product Advanced Books $661.11 294 3.9 799 SKU-001720
1722 Super Toys & Games Product Mini Toys & Games $737.99 128 1.5 603 SKU-001722
1723 Ultra Health & Beauty Product Lite Health & Beauty $488.67 325 1.7 938 SKU-001723
1724 Deluxe Health & Beauty Product Lite Health & Beauty $19.27 379 2.0 6 SKU-001724
1725 Premium Books Product Classic Books $768.25 420 2.8 260 SKU-001725
1726 Super Clothing Product Max Clothing $477.79 246 3.1 421 SKU-001726
1727 Premium Home & Garden Product Classic Home & Garden $320.40 425 1.5 541 SKU-001727
1728 Elite Automotive Product Advanced Automotive $239.56 185 3.3 189 SKU-001728
1730 Super Sports & Outdoors Product Advanced Sports & Outdoors $943.01 476 3.0 482 SKU-001730
1731 Deluxe Sports & Outdoors Product Pro Sports & Outdoors $179.67 450 4.6 323 SKU-001731
1732 Economy Health & Beauty Product Special Edition Health & Beauty $730.53 455 4.6 320 SKU-001732
1733 Premium Books Product Advanced Books $449.95 462 3.2 930 SKU-001733
1734 Pro Books Product 2024 Books $398.69 103 5.0 363 SKU-001734
1735 Premium Office Supplies Product Special Edition Office Supplies $193.96 177 2.2 296 SKU-001735
1737 Deluxe Electronics Product 2024 Electronics $201.58 215 4.4 814 SKU-001737
1738 Deluxe Automotive Product Classic Automotive $575.10 73 1.7 303 SKU-001738
1740 Economy Health & Beauty Product Mini Health & Beauty $425.10 395 2.9 896 SKU-001740
1741 Premium Food & Grocery Product Pro Food & Grocery $933.74 85 3.8 652 SKU-001741
1742 Standard Office Supplies Product Advanced Office Supplies $289.75 89 2.2 630 SKU-001742
1743 Standard Automotive Product Mini Automotive $766.99 300 3.6 310 SKU-001743
1744 Professional Office Supplies Product Classic Office Supplies $449.43 427 2.3 212 SKU-001744
1745 Premium Home & Garden Product Mini Home & Garden $170.28 304 2.6 206 SKU-001745
1746 Standard Office Supplies Product Plus Office Supplies $219.22 391 3.7 304 SKU-001746
1747 Professional Automotive Product Lite Automotive $778.06 154 2.0 723 SKU-001747
1748 Mega Electronics Product Pro Electronics $529.99 311 2.8 434 SKU-001748
1750 Deluxe Clothing Product Max Clothing $849.44 17 2.9 833 SKU-001750
1751 Ultra Sports & Outdoors Product Pro Sports & Outdoors $367.92 1 4.8 159 SKU-001751
1752 Super Clothing Product Plus Clothing $82.72 385 4.3 969 SKU-001752
1753 Elite Food & Grocery Product XL Food & Grocery $477.63 308 1.7 768 SKU-001753
1754 Premium Food & Grocery Product Advanced Food & Grocery $540.23 160 2.0 646 SKU-001754
1755 Mega Toys & Games Product Mini Toys & Games $611.51 210 3.8 261 SKU-001755
1756 Mega Toys & Games Product Max Toys & Games $704.54 63 3.7 315 SKU-001756
1757 Elite Automotive Product Lite Automotive $183.49 13 3.1 248 SKU-001757
1758 Professional Toys & Games Product 2024 Toys & Games $736.79 132 1.3 466 SKU-001758
1759 Premium Automotive Product Mini Automotive $230.14 295 3.5 33 SKU-001759
1760 Mega Office Supplies Product Plus Office Supplies $500.34 165 3.4 658 SKU-001760
1761 Economy Clothing Product XL Clothing $830.90 20 1.6 600 SKU-001761
1764 Standard Home & Garden Product XL Home & Garden $339.58 130 1.2 815 SKU-001764
1765 Deluxe Health & Beauty Product Mini Health & Beauty $298.20 78 3.3 617 SKU-001765
1766 Standard Sports & Outdoors Product Pro Sports & Outdoors $358.89 206 1.6 739 SKU-001766
1767 Super Office Supplies Product Special Edition Office Supplies $913.66 34 2.3 953 SKU-001767
1768 Deluxe Automotive Product Lite Automotive $929.36 479 4.3 61 SKU-001768
1769 Deluxe Office Supplies Product Pro Office Supplies $520.91 325 3.2 233 SKU-001769
1770 Professional Food & Grocery Product 2024 Food & Grocery $637.46 316 2.0 243 SKU-001770
1771 Deluxe Automotive Product Mini Automotive $116.68 21 1.9 235 SKU-001771
1772 Pro Books Product Advanced Books $977.22 103 4.3 727 SKU-001772
1773 Premium Toys & Games Product Pro Toys & Games $180.80 199 3.2 132 SKU-001773
1774 Super Toys & Games Product Classic Toys & Games $61.46 192 3.0 91 SKU-001774
1775 Economy Automotive Product 2024 Automotive $98.41 206 3.6 479 SKU-001775
1776 Elite Books Product Special Edition Books $67.82 257 3.4 670 SKU-001776
1777 Professional Food & Grocery Product Classic Food & Grocery $454.47 32 3.3 434 SKU-001777
1778 Ultra Office Supplies Product Mini Office Supplies $195.32 361 2.9 901 SKU-001778
1779 Premium Books Product Max Books $201.94 219 2.6 660 SKU-001779
1780 Ultra Sports & Outdoors Product Mini Sports & Outdoors $753.97 438 3.3 404 SKU-001780
1781 Super Health & Beauty Product Plus Health & Beauty $417.54 317 2.9 413 SKU-001781
1782 Super Automotive Product Advanced Automotive $507.67 180 3.6 333 SKU-001782
1783 Ultra Electronics Product Classic Electronics $420.63 376 2.6 100 SKU-001783
1785 Deluxe Books Product Mini Books $523.71 491 4.3 381 SKU-001785
1786 Standard Sports & Outdoors Product Classic Sports & Outdoors $326.97 58 5.0 487 SKU-001786
1787 Economy Food & Grocery Product 2024 Food & Grocery $760.45 66 4.4 87 SKU-001787
1788 Standard Automotive Product Advanced Automotive $631.44 357 2.7 308 SKU-001788
1789 Elite Clothing Product Mini Clothing $776.10 10 1.4 333 SKU-001789
1790 Pro Clothing Product Plus Clothing $860.20 30 3.5 25 SKU-001790
1791 Economy Books Product Mini Books $534.00 193 3.9 626 SKU-001791
1792 Premium Clothing Product Max Clothing $921.12 84 1.7 527 SKU-001792
1793 Elite Toys & Games Product Lite Toys & Games $645.61 377 3.0 154 SKU-001793
1794 Elite Books Product Special Edition Books $634.47 309 2.1 438 SKU-001794
1796 Super Food & Grocery Product 2024 Food & Grocery $603.63 300 3.2 566 SKU-001796
1797 Economy Food & Grocery Product Classic Food & Grocery $710.59 91 4.7 9 SKU-001797
1798 Ultra Health & Beauty Product Special Edition Health & Beauty $382.33 454 2.4 12 SKU-001798
1799 Super Toys & Games Product Pro Toys & Games $397.84 20 3.0 757 SKU-001799
1800 Super Food & Grocery Product Plus Food & Grocery $220.55 237 3.7 728 SKU-001800
1801 Elite Health & Beauty Product Advanced Health & Beauty $139.67 344 4.5 674 SKU-001801
1802 Ultra Toys & Games Product Classic Toys & Games $652.83 151 3.5 831 SKU-001802
1803 Deluxe Electronics Product Plus Electronics $145.47 237 4.8 501 SKU-001803
1804 Economy Food & Grocery Product Classic Food & Grocery $168.22 255 2.0 897 SKU-001804
1805 Economy Toys & Games Product Special Edition Toys & Games $252.37 160 1.4 35 SKU-001805
1806 Pro Home & Garden Product Mini Home & Garden $987.72 333 1.4 528 SKU-001806
1807 Premium Food & Grocery Product Advanced Food & Grocery $706.62 223 4.6 243 SKU-001807
1808 Mega Toys & Games Product Pro Toys & Games $323.80 345 2.9 718 SKU-001808
1810 Super Sports & Outdoors Product Classic Sports & Outdoors $896.04 134 1.3 880 SKU-001810
1811 Deluxe Electronics Product XL Electronics $89.57 205 4.5 2 SKU-001811
1812 Premium Food & Grocery Product Plus Food & Grocery $715.86 488 4.7 768 SKU-001812
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