Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

48 ms

Page Size

200

Current Page

50 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 50 Results Showing 9801 - 10000 of 24441

ID Name Category Price Stock Rating Reviews SKU
10360 Bulk Product 98cd319e Electronics $620.99 402 1.5 17 BULK-7191b095
10361 Bulk Product 2de29453 Clothing $961.23 68 0.2 28 BULK-c0653e8e
10362 Bulk Product eb453073 Sports & Outdoors $634.05 388 0.1 36 BULK-2b604157
10363 Bulk Product 8b149e38 Toys & Games $712.32 60 2.7 66 BULK-cd266282
10364 Bulk Product 3614f98b Electronics $39.97 372 0.3 17 BULK-fc172bfe
10365 Bulk Product 8bc71e7b Home & Garden $171.29 228 3.2 45 BULK-6f448456
10366 Bulk Product ae55a65d Electronics $10.99 340 0.8 81 BULK-e9dc3eb9
10367 Bulk Product 3ccf7cd0 Books $755.63 451 3.1 20 BULK-9f5a98eb
10368 Bulk Product f012a192 Clothing $864.19 226 3.7 75 BULK-f109b0da
10369 Bulk Product 1a617a43 Electronics $640.54 394 4.8 60 BULK-44b9ef56
10370 Bulk Product 3f696895 Home & Garden $701.83 27 3.9 6 BULK-f873e845
10371 Bulk Product 7cdbd9fe Clothing $660.99 19 0.7 91 BULK-1a71f87d
10372 Bulk Product 7e6c3632 Electronics $665.15 378 4.4 10 BULK-18225be9
10373 Bulk Product d8c3a031 Clothing $303.15 481 1.9 34 BULK-cb25a7f3
10374 Bulk Product 9a04d0c0 Books $327.34 56 3.1 31 BULK-c92b2a0b
10375 Bulk Product 883ed936 Home & Garden $384.05 361 0.5 77 BULK-827eac0c
10376 Bulk Product 4e1587fc Clothing $973.59 462 1.9 9 BULK-12e6da2a
10377 Bulk Product 0569ed6d Home & Garden $448.71 381 1.0 67 BULK-93254885
10378 Bulk Product 35d46e18 Toys & Games $198.43 476 2.8 92 BULK-bc580fd9
10379 Bulk Product 8c6e613c Electronics $38.96 92 1.0 59 BULK-95c8e934
10380 Bulk Product c4505daa Toys & Games $496.91 345 3.3 62 BULK-9d69ded9
10381 Bulk Product 4d88a3bb Sports & Outdoors $723.83 357 4.2 35 BULK-680d78c0
10382 Bulk Product 2db93793 Electronics $919.85 123 1.4 53 BULK-e9a210db
10383 Bulk Product 413ae7f9 Home & Garden $568.49 434 1.0 43 BULK-f69b1900
10384 Bulk Product 14687b5d Books $776.45 183 2.7 76 BULK-2e14544e
10385 Bulk Product e021772a Books $128.62 205 1.4 56 BULK-2e4e76d1
10386 Bulk Product f6fb5300 Toys & Games $581.20 421 4.2 3 BULK-77ee6b89
10387 Bulk Product 4edb89ea Electronics $542.04 345 1.9 23 BULK-a39ace45
10388 Bulk Product abd21d45 Clothing $431.98 443 1.3 55 BULK-83027a66
10389 Bulk Product 58582469 Home & Garden $955.26 312 1.8 96 BULK-5dd6aa47
10390 Bulk Product 78a44f9f Sports & Outdoors $871.41 386 0.3 83 BULK-18269b4a
10391 Bulk Product e2056690 Clothing $11.36 180 4.9 80 BULK-91d9fe1a
10392 Bulk Product 869d38d8 Electronics $996.88 303 1.9 88 BULK-0a4b23e0
10393 Bulk Product 07cfc214 Home & Garden $997.88 96 4.4 97 BULK-fcd7d862
10394 Bulk Product d336f50c Sports & Outdoors $891.28 466 0.5 94 BULK-fec8aa04
10395 Bulk Product 5ee4fa00 Clothing $278.04 432 0.3 11 BULK-a290040a
10396 Bulk Product 5a1f3c03 Books $274.03 117 1.9 42 BULK-43e5abba
10397 Bulk Product 88aef6aa Books $911.16 106 4.5 3 BULK-8ae4b4be
10398 Bulk Product 14837c11 Sports & Outdoors $61.04 182 1.8 26 BULK-b0ecc98d
10399 Bulk Product 14940ccb Electronics $474.87 53 3.8 30 BULK-e9eddc03
10400 Bulk Product 14bde8bb Electronics $289.47 293 2.4 99 BULK-ba7e5006
10401 Bulk Product 9fc36832 Toys & Games $538.37 96 5.0 14 BULK-c4ed7a57
10402 Bulk Product bc15c695 Home & Garden $60.77 63 4.5 90 BULK-883dc85f
10403 Bulk Product 0ab38094 Home & Garden $676.21 122 5.0 10 BULK-8772236e
10404 Bulk Product 8173ecc2 Toys & Games $909.47 429 0.1 1 BULK-30a0cc6f
10405 Bulk Product 16a4272e Sports & Outdoors $245.88 105 1.7 26 BULK-51c98bc7
10406 Bulk Product bdd40ec9 Books $423.05 472 4.4 50 BULK-1f7fb211
10407 Bulk Product 5bd5fa29 Books $112.69 164 0.6 61 BULK-da482568
10408 Bulk Product 55b498c1 Clothing $411.82 449 0.9 60 BULK-317a4c07
10409 Bulk Product e53765ef Sports & Outdoors $282.75 19 1.3 13 BULK-608af5d6
10410 Bulk Product f37aeb41 Home & Garden $671.91 217 1.6 1 BULK-a45303a4
10411 Bulk Product 1aa07be1 Books $891.61 207 2.0 90 BULK-a945a5c7
10412 Bulk Product 14dee846 Toys & Games $749.39 216 0.4 5 BULK-92f0b27a
10413 Bulk Product 410c0d54 Toys & Games $1,002.61 366 2.1 35 BULK-bff298ce
10414 Bulk Product f1faf751 Books $24.38 289 3.1 83 BULK-663eb13d
10415 Bulk Product a2ed8520 Sports & Outdoors $272.48 343 4.0 72 BULK-105ccfeb
10416 Bulk Product ee7439e5 Books $474.66 219 2.8 53 BULK-9ad243b0
10417 Bulk Product 8481f77c Home & Garden $427.66 399 0.6 13 BULK-3dd46f57
10418 Bulk Product b0c2f8a5 Sports & Outdoors $237.49 389 4.2 9 BULK-ce30d226
10419 Bulk Product 045b6c26 Sports & Outdoors $496.50 391 3.7 76 BULK-b247f1ad
10420 Bulk Product baf2045f Electronics $457.40 115 4.7 85 BULK-8a4b1dda
10421 Bulk Product 8e103166 Electronics $379.16 380 4.3 5 BULK-f847fb4c
10422 Bulk Product e91a5e3f Books $402.93 382 2.3 80 BULK-7b1b4bf4
10423 Bulk Product 160696ed Sports & Outdoors $727.13 475 3.1 59 BULK-adb0770c
10424 Bulk Product 707a5a50 Electronics $165.61 95 0.9 29 BULK-4a3c7688
10425 Bulk Product 4d2b997c Sports & Outdoors $682.30 297 1.1 24 BULK-7f2eca76
10426 Bulk Product 8937d0f5 Books $299.28 93 4.9 36 BULK-ff4fdcf3
10427 Bulk Product 259f82c9 Home & Garden $691.45 247 0.8 93 BULK-7d3813fd
10428 Bulk Product 9bda6606 Toys & Games $938.64 216 1.0 32 BULK-e1db3db5
10429 Bulk Product 5f6bd276 Clothing $314.63 394 2.4 78 BULK-15307f15
10430 Bulk Product 15ff8ab7 Clothing $329.09 13 4.4 19 BULK-2fcb911e
10431 Bulk Product 0c7b40ec Sports & Outdoors $222.64 34 3.3 55 BULK-d2343060
10432 Bulk Product dd0d8f80 Toys & Games $842.54 430 4.1 45 BULK-4c72b2c3
10433 Bulk Product 1a59791d Electronics $55.90 410 1.2 23 BULK-ab3486cd
10434 Bulk Product 4680d461 Toys & Games $816.62 144 4.1 82 BULK-a53038aa
10435 Bulk Product bc65d700 Clothing $636.85 375 3.0 7 BULK-a3aef224
10436 Bulk Product 03b31533 Toys & Games $725.56 195 3.2 73 BULK-e7f53caa
10437 Bulk Product bb66d8d5 Electronics $143.05 394 0.8 59 BULK-7f5f3bc8
10438 Bulk Product 32da064e Books $882.57 108 4.7 79 BULK-d4e25bbd
10439 Bulk Product d129b9cf Home & Garden $659.49 67 0.5 40 BULK-7d37a4f5
10440 Bulk Product 0df0add9 Toys & Games $206.96 476 1.0 29 BULK-2e61f830
10441 Bulk Product 039bf4a4 Clothing $638.32 106 4.9 61 BULK-b920d1a0
10442 Bulk Product 44f54cbe Clothing $680.25 400 3.0 5 BULK-99d1f754
10443 Bulk Product f0a571cc Home & Garden $775.96 399 3.0 40 BULK-4ebd2665
10444 Bulk Product e00a5613 Clothing $241.65 139 0.5 44 BULK-2c6c606a
10445 Bulk Product 279e9c5a Toys & Games $620.94 382 0.9 83 BULK-493a852e
10446 Bulk Product 98b4250e Clothing $443.59 488 3.9 98 BULK-55231ee6
10447 Bulk Product 38602a09 Books $846.92 326 2.6 14 BULK-b9fe8b9f
10448 Bulk Product 4e781488 Toys & Games $1,004.28 110 4.8 41 BULK-65efe7d4
10449 Bulk Product 6d64f5fb Electronics $877.18 409 1.4 34 BULK-da78b728
10450 Bulk Product 5bee1d5b Electronics $317.83 104 3.9 21 BULK-003e4a66
10451 Bulk Product a997f9bf Home & Garden $243.96 265 1.6 96 BULK-f55f934a
10452 Bulk Product c88d373e Sports & Outdoors $758.81 107 4.9 37 BULK-b592b76c
10453 Bulk Product 46d88a7b Electronics $314.20 38 3.1 8 BULK-35ba93ce
10454 Bulk Product bfd33794 Electronics $877.30 302 2.1 55 BULK-bff34a95
10455 Bulk Product 5c48f291 Books $267.05 322 0.8 74 BULK-7adecb72
10456 Bulk Product addbb9ed Clothing $12.05 483 1.5 90 BULK-cc2bbef0
10457 Bulk Product 900f70ef Clothing $475.75 137 2.7 11 BULK-9008abc2
10458 Bulk Product cffc9d22 Clothing $189.45 392 2.6 61 BULK-d724af60
10459 Bulk Product a827291d Toys & Games $395.89 124 3.7 15 BULK-f449afeb
10460 Bulk Product ab030da6 Books $815.62 462 3.8 40 BULK-ccc90dfa
10461 Bulk Product 54d0252f Home & Garden $818.70 14 0.3 2 BULK-bda66ad3
10462 Bulk Product 42fd88a2 Electronics $848.47 9 3.1 20 BULK-cc2b4656
10463 Bulk Product 61e95231 Electronics $508.01 375 0.9 88 BULK-b7341805
10464 Bulk Product 71c82a2a Toys & Games $243.33 256 2.0 40 BULK-aaff1171
10465 Bulk Product 9f9b4743 Sports & Outdoors $157.65 403 4.9 72 BULK-8fa95cb2
10466 Bulk Product bab00a33 Home & Garden $971.28 433 4.8 78 BULK-a44d1173
10467 Bulk Product 184f92c6 Home & Garden $145.81 458 3.3 42 BULK-78a5bef4
10468 Bulk Product 99809238 Books $436.25 212 1.7 61 BULK-79fb691d
10469 Bulk Product d03a9e4f Clothing $814.27 492 4.0 14 BULK-64b686a8
10470 Bulk Product af82f611 Toys & Games $551.31 457 3.2 50 BULK-e62f1954
10471 Bulk Product 78ebd7dc Books $356.30 129 1.3 44 BULK-58ddac8a
10472 Bulk Product 6b092c50 Books $203.66 239 2.2 10 BULK-552fafeb
10473 Bulk Product 908d0431 Books $205.77 119 3.8 87 BULK-a10484e2
10474 Bulk Product 7d0fd76a Sports & Outdoors $905.00 379 2.8 29 BULK-b94cae1e
10475 Bulk Product 96c41ae7 Sports & Outdoors $370.21 483 4.2 17 BULK-c0d0d493
10476 Bulk Product c01a05cd Electronics $356.28 351 2.9 71 BULK-ca553f07
10477 Bulk Product f17180fe Toys & Games $77.38 401 2.3 67 BULK-4e59930e
10478 Bulk Product 2e6dd608 Clothing $279.73 33 4.3 15 BULK-71803da6
10479 Bulk Product c5362caf Books $19.23 100 3.4 50 BULK-afd2fe60
10480 Bulk Product 8f3d507a Clothing $583.77 180 3.9 79 BULK-973ce432
10481 Bulk Product bc7e66b0 Sports & Outdoors $611.50 267 3.5 29 BULK-c031907d
10482 Bulk Product 0598d35d Toys & Games $883.91 52 2.2 21 BULK-e0aefd50
10483 Bulk Product 97ea7d07 Electronics $557.90 1 4.9 59 BULK-25080311
10484 Bulk Product 417e4f90 Sports & Outdoors $272.04 141 0.2 24 BULK-4a612f4c
10485 Bulk Product dab1e557 Sports & Outdoors $928.15 94 0.4 58 BULK-506f22d3
10486 Bulk Product d6766ed8 Sports & Outdoors $985.24 463 3.1 54 BULK-83e0d44f
10487 Bulk Product c7e46cb3 Home & Garden $337.20 464 1.8 70 BULK-05d2227d
10488 Bulk Product 56601995 Electronics $179.90 246 1.4 57 BULK-f39a8994
10489 Bulk Product 5224dac4 Sports & Outdoors $821.32 8 1.2 6 BULK-ff39ddfb
10490 Bulk Product 7ab71023 Sports & Outdoors $150.52 489 0.7 93 BULK-8c44e4df
10491 Bulk Product eb3e15ce Books $602.71 451 0.1 48 BULK-200e8c08
10492 Bulk Product 63e72787 Clothing $52.57 48 2.3 84 BULK-5e355fde
10493 Bulk Product 9b483eca Sports & Outdoors $323.55 489 1.7 83 BULK-61ecc65f
10494 Bulk Product ff8634e7 Clothing $656.45 203 3.3 97 BULK-1d69d899
10495 Bulk Product a989e3fa Home & Garden $607.61 72 1.8 80 BULK-fa7d517e
10496 Bulk Product a7fccd13 Home & Garden $890.65 67 3.0 37 BULK-acbe9d68
10497 Bulk Product 001de619 Sports & Outdoors $633.88 199 3.4 47 BULK-a68c8f5a
10498 Bulk Product 74690e03 Clothing $783.23 41 3.5 22 BULK-d95031ed
10499 Bulk Product dc95a9fe Sports & Outdoors $791.39 486 0.6 46 BULK-b0ccf033
10500 Bulk Product b5149614 Electronics $31.51 327 2.7 75 BULK-b7e9a233
10501 Bulk Product 700e7f6c Home & Garden $1,006.74 98 1.0 80 BULK-a4a7e9ba
10502 Bulk Product 614b6750 Toys & Games $876.30 439 1.0 13 BULK-ec6dd410
10503 Bulk Product c8523278 Home & Garden $812.47 373 4.2 97 BULK-f86d1723
10504 Bulk Product 13f00113 Clothing $856.57 445 1.5 50 BULK-0ddbde1a
10505 Bulk Product 2f967b7a Sports & Outdoors $533.68 336 1.6 14 BULK-801b9313
10506 Bulk Product 0cb9acb4 Home & Garden $597.07 135 2.3 64 BULK-f4459557
10507 Bulk Product 9c8a71f1 Toys & Games $695.17 409 3.9 22 BULK-76255acd
10508 Bulk Product 507205f0 Electronics $919.58 18 3.6 94 BULK-b47f5152
10509 Bulk Product f706c08b Toys & Games $843.98 306 4.1 59 BULK-9ac09d70
10510 Bulk Product 5c5a487a Clothing $827.27 231 1.2 92 BULK-27274de4
10511 Bulk Product d893e944 Home & Garden $263.79 16 0.1 84 BULK-3de7dc39
10512 Bulk Product 18e796dc Clothing $891.69 155 1.7 91 BULK-968d672e
10513 Bulk Product 0dbf98c2 Sports & Outdoors $630.85 497 2.2 86 BULK-009b5555
10514 Bulk Product 1fedde86 Sports & Outdoors $664.08 181 1.6 53 BULK-2d12de69
10515 Bulk Product 59498582 Books $136.87 181 2.3 80 BULK-43c36bfc
10516 Bulk Product 3514e04b Sports & Outdoors $443.57 237 4.2 27 BULK-61439f87
10517 Bulk Product c1d28a1a Toys & Games $460.13 51 2.4 71 BULK-b90a7ed3
10518 Bulk Product 997d3383 Electronics $809.93 297 4.0 18 BULK-73ed8f20
10519 Bulk Product c41d2e75 Clothing $751.37 127 3.0 33 BULK-86dd7209
10520 Bulk Product d9d59f30 Books $381.01 160 0.6 63 BULK-466cc520
10521 Bulk Product 70d0085e Toys & Games $887.96 15 0.4 48 BULK-6856c290
10522 Bulk Product a5c71f58 Toys & Games $193.89 226 3.4 48 BULK-48e02fe0
10523 Bulk Product faa8ee94 Toys & Games $209.48 413 3.0 93 BULK-9593775f
10524 Bulk Product 9131f6d2 Toys & Games $578.10 88 4.1 59 BULK-5be07fe4
10525 Bulk Product 25f58f14 Electronics $540.16 106 1.8 79 BULK-88496ae0
10526 Bulk Product 0f9300c8 Toys & Games $447.21 133 3.7 95 BULK-01817abf
10527 Bulk Product 4c03d18b Books $734.98 111 2.2 48 BULK-c18f9acd
10528 Bulk Product 94c32420 Sports & Outdoors $347.04 46 4.1 63 BULK-daee1820
10529 Bulk Product d185fa24 Sports & Outdoors $457.67 292 1.7 76 BULK-9a669126
10530 Bulk Product 59539d4d Books $207.91 204 3.8 41 BULK-213369b2
10531 Bulk Product 8ecbad6d Electronics $48.05 55 3.2 28 BULK-d9ab1ab4
10532 Bulk Product b54f9c69 Clothing $494.22 473 1.9 54 BULK-56e8da9f
10533 Bulk Product 2b8f9818 Clothing $381.27 3 1.4 44 BULK-ebd776e2
10534 Bulk Product 838e2095 Clothing $358.76 160 2.6 32 BULK-c773f183
10535 Bulk Product 43a32ec5 Home & Garden $755.89 49 1.6 83 BULK-bdc98050
10536 Bulk Product 4c0ed2ea Books $812.77 93 2.9 86 BULK-30575a1b
10537 Bulk Product b186cedf Electronics $212.32 102 0.7 0 BULK-a9d621e1
10538 Bulk Product b9e8f393 Books $351.65 3 3.1 76 BULK-b640c368
10539 Bulk Product 0c7e4d48 Clothing $947.00 447 1.3 32 BULK-5472518d
10540 Bulk Product 19986bf4 Clothing $33.59 368 2.5 24 BULK-3ef88a15
10541 Bulk Product acd4239b Toys & Games $302.35 141 3.1 98 BULK-ca81a78c
10542 Bulk Product 552cff6b Electronics $871.96 243 4.7 32 BULK-1025d133
10543 Bulk Product 2e7678e6 Clothing $646.73 412 2.0 89 BULK-a5f2778a
10544 Bulk Product bbf0ce58 Electronics $383.60 172 4.5 38 BULK-1559f40f
10545 Bulk Product ebb56482 Books $221.61 394 4.6 3 BULK-5ab2c503
10546 Bulk Product dbd1ecee Home & Garden $156.87 407 4.4 72 BULK-c2853ee4
10547 Bulk Product b8d7dc98 Books $58.87 485 2.6 72 BULK-421f0245
10548 Bulk Product 55849927 Clothing $269.22 236 4.2 58 BULK-529fff32
10549 Bulk Product 38364dc4 Toys & Games $440.44 485 2.2 67 BULK-8d028ba1
10550 Bulk Product 19366457 Books $847.00 185 3.8 69 BULK-7192baa9
10551 Bulk Product 6b1e2a66 Toys & Games $898.88 56 2.1 8 BULK-77c5bb9c
10552 Bulk Product 68954f27 Home & Garden $570.30 251 0.8 95 BULK-bef4288b
10553 Bulk Product b43f9e1b Home & Garden $333.03 381 0.2 26 BULK-41659ff6
10554 Bulk Product c48cdb9b Clothing $920.58 98 1.2 1 BULK-ffcffeec
10555 Bulk Product 849a2016 Toys & Games $251.16 369 1.1 18 BULK-1784fb6d
10556 Bulk Product a3e80170 Home & Garden $911.34 229 0.1 0 BULK-43c79f97
10557 Bulk Product a7c15f13 Sports & Outdoors $151.59 479 0.2 8 BULK-3165d12f
10558 Bulk Product 0da12b06 Toys & Games $639.11 85 1.1 82 BULK-dc7cda01
10559 Bulk Product 797d23a6 Clothing $183.43 235 3.7 53 BULK-228e77df
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