Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

9 ms

Page Size

200

Current Page

11 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 11 Results Showing 2001 - 2200 of 24441

ID Name Category Price Stock Rating Reviews SKU
2250 Standard Food & Grocery Product XL Food & Grocery $529.69 72 2.6 674 SKU-002250
2252 Super Home & Garden Product Classic Home & Garden $602.16 310 3.2 919 SKU-002252
2253 Economy Clothing Product Special Edition Clothing $914.28 373 4.3 593 SKU-002253
2254 Premium Clothing Product Pro Clothing $498.04 132 1.6 895 SKU-002254
2255 Professional Books Product 2024 Books $421.84 106 1.6 897 SKU-002255
2256 Standard Books Product XL Books $200.25 200 4.9 262 SKU-002256
2257 Ultra Office Supplies Product Special Edition Office Supplies $835.04 35 4.2 55 SKU-002257
2258 Super Toys & Games Product Lite Toys & Games $272.29 274 2.2 992 SKU-002258
2259 Elite Sports & Outdoors Product Lite Sports & Outdoors $621.25 486 1.7 184 SKU-002259
2260 Professional Clothing Product Classic Clothing $87.64 379 3.2 264 SKU-002260
2261 Elite Books Product 2024 Books $724.48 200 4.9 660 SKU-002261
2262 Mega Books Product Max Books $950.04 473 4.3 578 SKU-002262
2263 Deluxe Sports & Outdoors Product Pro Sports & Outdoors $278.26 274 4.7 213 SKU-002263
2264 Standard Automotive Product Advanced Automotive $664.67 287 3.8 599 SKU-002264
2266 Deluxe Electronics Product Classic Electronics $780.66 499 1.2 471 SKU-002266
2267 Deluxe Toys & Games Product 2024 Toys & Games $301.00 444 3.3 497 SKU-002267
2268 Professional Electronics Product Classic Electronics $297.15 94 4.2 208 SKU-002268
2269 Premium Home & Garden Product Pro Home & Garden $689.32 414 4.3 278 SKU-002269
2270 Super Health & Beauty Product Lite Health & Beauty $531.57 230 2.0 59 SKU-002270
2271 Super Sports & Outdoors Product XL Sports & Outdoors $761.92 467 2.1 909 SKU-002271
2272 Deluxe Clothing Product Mini Clothing $820.21 230 2.9 403 SKU-002272
2273 Standard Books Product XL Books $459.51 495 2.9 176 SKU-002273
2274 Economy Sports & Outdoors Product Advanced Sports & Outdoors $362.08 106 3.6 302 SKU-002274
2275 Mega Books Product Plus Books $614.44 79 3.7 35 SKU-002275
2276 Ultra Clothing Product Plus Clothing $501.15 361 4.3 250 SKU-002276
2277 Professional Home & Garden Product Max Home & Garden $798.34 29 4.7 588 SKU-002277
2278 Elite Office Supplies Product Plus Office Supplies $454.98 291 4.8 523 SKU-002278
2279 Super Food & Grocery Product Special Edition Food & Grocery $385.64 291 3.3 505 SKU-002279
2280 Pro Health & Beauty Product Pro Health & Beauty $837.74 203 2.1 754 SKU-002280
2281 Ultra Sports & Outdoors Product Pro Sports & Outdoors $166.80 359 4.1 6 SKU-002281
2282 Professional Books Product Lite Books $704.08 115 2.1 741 SKU-002282
2283 Super Toys & Games Product Advanced Toys & Games $739.41 341 3.1 262 SKU-002283
2284 Economy Food & Grocery Product 2024 Food & Grocery $381.10 107 4.4 272 SKU-002284
2285 Premium Health & Beauty Product Mini Health & Beauty $759.49 268 4.9 602 SKU-002285
2286 Pro Clothing Product Advanced Clothing $163.46 123 1.6 708 SKU-002286
2288 Elite Food & Grocery Product Plus Food & Grocery $471.76 172 3.8 88 SKU-002288
2289 Professional Toys & Games Product Lite Toys & Games $85.22 447 3.9 911 SKU-002289
2290 Mega Electronics Product Pro Electronics $133.77 60 1.6 494 SKU-002290
2291 Elite Books Product Advanced Books $23.72 116 2.3 394 SKU-002291
2292 Elite Food & Grocery Product Special Edition Food & Grocery $890.43 370 2.9 487 SKU-002292
2294 Mega Home & Garden Product 2024 Home & Garden $83.25 205 3.1 972 SKU-002294
2296 Premium Home & Garden Product 2024 Home & Garden $379.96 238 3.4 757 SKU-002296
2298 Economy Automotive Product 2024 Automotive $27.99 367 1.2 965 SKU-002298
2299 Economy Health & Beauty Product Plus Health & Beauty $891.92 368 4.3 922 SKU-002299
2300 Mega Toys & Games Product Plus Toys & Games $723.69 402 2.6 326 SKU-002300
2301 Professional Office Supplies Product 2024 Office Supplies $510.01 234 2.8 6 SKU-002301
2302 Mega Books Product Plus Books $877.67 158 2.2 867 SKU-002302
2303 Super Clothing Product Lite Clothing $638.46 5 1.5 836 SKU-002303
2304 Economy Sports & Outdoors Product Pro Sports & Outdoors $607.87 451 4.0 645 SKU-002304
2305 Standard Clothing Product Classic Clothing $387.57 263 4.1 783 SKU-002305
2306 Economy Home & Garden Product Special Edition Home & Garden $937.71 364 1.0 752 SKU-002306
2307 Ultra Home & Garden Product Max Home & Garden $691.15 164 4.0 923 SKU-002307
2308 Economy Clothing Product Mini Clothing $66.83 354 2.8 46 SKU-002308
2309 Ultra Sports & Outdoors Product 2024 Sports & Outdoors $421.90 80 1.7 9 SKU-002309
2310 Elite Sports & Outdoors Product Special Edition Sports & Outdoors $363.78 70 2.3 828 SKU-002310
2311 Economy Clothing Product Special Edition Clothing $261.52 147 4.5 22 SKU-002311
2312 Super Automotive Product Pro Automotive $198.32 274 2.4 729 SKU-002312
2313 Pro Health & Beauty Product 2024 Health & Beauty $801.29 83 1.1 356 SKU-002313
2314 Super Automotive Product Lite Automotive $346.86 117 2.7 681 SKU-002314
2316 Economy Food & Grocery Product XL Food & Grocery $552.98 43 2.3 583 SKU-002316
2318 Mega Books Product Pro Books $771.33 69 4.6 502 SKU-002318
2319 Economy Toys & Games Product Advanced Toys & Games $192.31 109 2.3 144 SKU-002319
2320 Premium Automotive Product Plus Automotive $50.84 360 3.1 313 SKU-002320
2321 Professional Sports & Outdoors Product Mini Sports & Outdoors $702.08 59 1.8 460 SKU-002321
2322 Elite Electronics Product XL Electronics $443.20 222 3.6 937 SKU-002322
2323 Ultra Health & Beauty Product Max Health & Beauty $36.29 12 2.7 771 SKU-002323
2324 Standard Office Supplies Product Lite Office Supplies $433.08 155 2.5 257 SKU-002324
2325 Deluxe Clothing Product 2024 Clothing $185.21 301 2.9 593 SKU-002325
2327 Super Electronics Product Mini Electronics $663.71 202 2.7 205 SKU-002327
2329 Super Automotive Product Advanced Automotive $157.96 456 4.5 443 SKU-002329
2330 Economy Toys & Games Product Plus Toys & Games $336.74 2 2.4 915 SKU-002330
2331 Deluxe Health & Beauty Product 2024 Health & Beauty $811.89 111 4.0 666 SKU-002331
2332 Economy Office Supplies Product Classic Office Supplies $341.19 197 1.6 45 SKU-002332
2334 Professional Office Supplies Product Advanced Office Supplies $572.94 179 2.1 582 SKU-002334
2336 Mega Sports & Outdoors Product Advanced Sports & Outdoors $138.20 113 3.5 945 SKU-002336
2337 Mega Electronics Product Lite Electronics $105.15 255 1.8 377 SKU-002337
2338 Pro Home & Garden Product Special Edition Home & Garden $532.37 327 3.7 992 SKU-002338
2339 Elite Office Supplies Product Classic Office Supplies $769.07 365 1.3 690 SKU-002339
2340 Elite Books Product Special Edition Books $843.21 52 5.0 879 SKU-002340
2341 Premium Automotive Product Mini Automotive $186.90 18 1.7 104 SKU-002341
2344 Super Food & Grocery Product Lite Food & Grocery $981.81 495 4.7 162 SKU-002344
2345 Standard Home & Garden Product Plus Home & Garden $835.84 455 1.3 112 SKU-002345
2346 Pro Electronics Product XL Electronics $861.14 405 1.2 797 SKU-002346
2347 Super Office Supplies Product Special Edition Office Supplies $338.41 264 2.5 327 SKU-002347
2348 Super Office Supplies Product Mini Office Supplies $706.75 369 1.5 212 SKU-002348
2349 Mega Home & Garden Product Max Home & Garden $313.30 337 1.2 30 SKU-002349
2350 Premium Toys & Games Product Special Edition Toys & Games $349.45 389 1.2 96 SKU-002350
2351 Economy Health & Beauty Product Advanced Health & Beauty $967.47 89 5.0 616 SKU-002351
2352 Standard Office Supplies Product Classic Office Supplies $445.88 414 1.7 727 SKU-002352
2353 Economy Home & Garden Product Pro Home & Garden $954.12 111 3.6 257 SKU-002353
2354 Ultra Electronics Product Max Electronics $956.90 387 2.8 348 SKU-002354
2355 Deluxe Books Product Max Books $366.85 306 3.1 914 SKU-002355
2356 Deluxe Automotive Product Classic Automotive $308.63 370 1.2 137 SKU-002356
2357 Ultra Home & Garden Product Lite Home & Garden $723.01 242 1.7 706 SKU-002357
2358 Standard Office Supplies Product Mini Office Supplies $744.10 169 3.0 343 SKU-002358
2359 Standard Office Supplies Product Max Office Supplies $111.13 418 4.6 405 SKU-002359
2360 Pro Office Supplies Product Lite Office Supplies $708.21 289 1.8 421 SKU-002360
2362 Professional Health & Beauty Product Special Edition Health & Beauty $472.96 429 4.9 262 SKU-002362
2363 Super Clothing Product 2024 Clothing $557.23 341 4.6 999 SKU-002363
2364 Ultra Toys & Games Product Classic Toys & Games $575.17 397 1.9 767 SKU-002364
2365 Economy Clothing Product Plus Clothing $546.76 59 3.1 524 SKU-002365
2366 Elite Books Product Mini Books $779.53 22 1.0 201 SKU-002366
2368 Economy Automotive Product Classic Automotive $405.16 449 4.2 927 SKU-002368
2369 Mega Office Supplies Product 2024 Office Supplies $876.32 456 2.3 959 SKU-002369
2370 Ultra Health & Beauty Product XL Health & Beauty $862.15 85 2.7 898 SKU-002370
2371 Elite Books Product XL Books $398.66 2 4.5 192 SKU-002371
2372 Pro Office Supplies Product Mini Office Supplies $722.42 314 3.9 556 SKU-002372
2373 Premium Food & Grocery Product Classic Food & Grocery $99.58 492 4.9 489 SKU-002373
2374 Pro Health & Beauty Product XL Health & Beauty $539.02 229 2.5 588 SKU-002374
2375 Mega Books Product Lite Books $821.13 495 1.6 662 SKU-002375
2376 Elite Toys & Games Product Advanced Toys & Games $661.24 484 4.4 971 SKU-002376
2377 Mega Clothing Product Special Edition Clothing $784.48 376 3.4 422 SKU-002377
2378 Professional Clothing Product Max Clothing $843.99 364 4.1 340 SKU-002378
2379 Premium Toys & Games Product Lite Toys & Games $134.19 324 1.6 891 SKU-002379
2380 Pro Books Product Pro Books $804.61 191 2.2 647 SKU-002380
2381 Deluxe Toys & Games Product XL Toys & Games $789.97 130 2.8 556 SKU-002381
2382 Elite Sports & Outdoors Product Plus Sports & Outdoors $315.17 328 4.7 164 SKU-002382
2383 Super Sports & Outdoors Product Advanced Sports & Outdoors $538.74 162 4.4 47 SKU-002383
2384 Deluxe Clothing Product Lite Clothing $670.26 329 4.6 992 SKU-002384
2385 Mega Toys & Games Product XL Toys & Games $448.69 46 3.5 281 SKU-002385
2388 Pro Home & Garden Product Special Edition Home & Garden $669.62 210 4.8 83 SKU-002388
2389 Mega Automotive Product XL Automotive $759.21 447 3.0 468 SKU-002389
2390 Mega Automotive Product Advanced Automotive $193.20 241 1.5 481 SKU-002390
2391 Ultra Health & Beauty Product Classic Health & Beauty $309.68 211 1.0 42 SKU-002391
2392 Elite Health & Beauty Product 2024 Health & Beauty $331.14 420 1.2 159 SKU-002392
2393 Ultra Food & Grocery Product 2024 Food & Grocery $116.35 81 1.8 836 SKU-002393
2394 Mega Automotive Product 2024 Automotive $611.71 35 2.0 141 SKU-002394
2395 Elite Office Supplies Product Max Office Supplies $912.51 32 1.4 473 SKU-002395
2396 Ultra Clothing Product Pro Clothing $590.14 29 3.0 143 SKU-002396
2398 Super Sports & Outdoors Product Advanced Sports & Outdoors $130.38 308 1.9 320 SKU-002398
2399 Economy Electronics Product Classic Electronics $963.02 134 2.5 729 SKU-002399
2400 Elite Home & Garden Product XL Home & Garden $917.43 441 4.7 52 SKU-002400
2401 Deluxe Office Supplies Product Lite Office Supplies $249.97 83 4.9 276 SKU-002401
2402 Professional Automotive Product Mini Automotive $700.11 439 3.3 656 SKU-002402
2403 Ultra Electronics Product Lite Electronics $851.58 307 2.1 64 SKU-002403
2404 Ultra Health & Beauty Product Max Health & Beauty $261.02 31 3.9 353 SKU-002404
2405 Standard Electronics Product Plus Electronics $551.87 281 3.2 35 SKU-002405
2407 Economy Clothing Product Advanced Clothing $513.02 4 4.6 370 SKU-002407
2408 Mega Sports & Outdoors Product Classic Sports & Outdoors $994.18 354 2.8 182 SKU-002408
2409 Premium Automotive Product XL Automotive $908.17 249 1.2 272 SKU-002409
2410 Elite Home & Garden Product Max Home & Garden $962.29 172 4.1 589 SKU-002410
2411 Ultra Toys & Games Product Plus Toys & Games $559.15 410 1.4 371 SKU-002411
2412 Elite Clothing Product Special Edition Clothing $361.16 459 2.6 129 SKU-002412
2413 Super Home & Garden Product XL Home & Garden $945.12 176 4.5 808 SKU-002413
2414 Premium Toys & Games Product Special Edition Toys & Games $486.54 423 3.9 358 SKU-002414
2415 Elite Books Product Special Edition Books $901.73 420 4.0 210 SKU-002415
2416 Deluxe Health & Beauty Product Special Edition Health & Beauty $729.83 485 3.4 732 SKU-002416
2417 Standard Automotive Product XL Automotive $429.32 176 1.5 904 SKU-002417
2418 Super Electronics Product Mini Electronics $697.03 375 4.2 991 SKU-002418
2419 Elite Electronics Product Lite Electronics $527.59 204 4.5 795 SKU-002419
2420 Ultra Sports & Outdoors Product XL Sports & Outdoors $125.30 112 2.5 931 SKU-002420
2421 Economy Electronics Product Special Edition Electronics $722.52 108 3.2 542 SKU-002421
2422 Super Sports & Outdoors Product XL Sports & Outdoors $276.84 475 4.5 303 SKU-002422
2423 Standard Food & Grocery Product Max Food & Grocery $959.24 248 2.9 15 SKU-002423
2424 Ultra Clothing Product Pro Clothing $484.10 415 1.2 490 SKU-002424
2425 Mega Toys & Games Product Plus Toys & Games $915.38 401 1.6 506 SKU-002425
2426 Elite Books Product Plus Books $983.89 22 4.5 415 SKU-002426
2427 Ultra Home & Garden Product Max Home & Garden $174.99 37 2.2 173 SKU-002427
2428 Professional Food & Grocery Product Plus Food & Grocery $591.99 236 2.5 400 SKU-002428
2429 Premium Home & Garden Product Max Home & Garden $180.20 207 2.9 694 SKU-002429
2431 Super Toys & Games Product Plus Toys & Games $801.52 146 2.0 122 SKU-002431
2432 Professional Books Product XL Books $412.91 207 2.8 43 SKU-002432
2433 Super Toys & Games Product Lite Toys & Games $299.57 219 2.3 801 SKU-002433
2434 Elite Electronics Product Advanced Electronics $928.19 270 2.6 47 SKU-002434
2435 Standard Food & Grocery Product Pro Food & Grocery $811.81 58 3.3 546 SKU-002435
2436 Ultra Office Supplies Product Mini Office Supplies $91.97 424 2.5 295 SKU-002436
2437 Pro Clothing Product Special Edition Clothing $840.15 424 2.3 659 SKU-002437
2438 Ultra Toys & Games Product Plus Toys & Games $607.50 342 4.6 372 SKU-002438
2439 Professional Books Product XL Books $554.03 68 4.5 994 SKU-002439
2440 Premium Office Supplies Product 2024 Office Supplies $989.44 60 3.0 480 SKU-002440
2441 Mega Automotive Product Advanced Automotive $188.10 212 4.9 716 SKU-002441
2442 Mega Clothing Product Max Clothing $603.53 193 2.6 439 SKU-002442
2443 Mega Books Product Plus Books $432.23 21 2.6 887 SKU-002443
2444 Elite Clothing Product Plus Clothing $299.83 327 3.6 441 SKU-002444
2446 Deluxe Health & Beauty Product XL Health & Beauty $548.67 433 4.7 765 SKU-002446
2447 Deluxe Food & Grocery Product Pro Food & Grocery $597.67 183 3.3 0 SKU-002447
2448 Professional Electronics Product Pro Electronics $408.17 329 2.6 65 SKU-002448
2449 Economy Health & Beauty Product Max Health & Beauty $734.50 28 4.6 550 SKU-002449
2450 Mega Food & Grocery Product Pro Food & Grocery $522.26 16 1.6 726 SKU-002450
2451 Mega Toys & Games Product Advanced Toys & Games $118.92 31 2.9 884 SKU-002451
2452 Standard Clothing Product Special Edition Clothing $765.78 123 1.2 508 SKU-002452
2453 Professional Food & Grocery Product Mini Food & Grocery $930.14 217 3.0 90 SKU-002453
2455 Premium Office Supplies Product Mini Office Supplies $77.93 373 3.0 694 SKU-002455
2456 Professional Books Product Special Edition Books $510.53 93 4.9 422 SKU-002456
2457 Pro Food & Grocery Product Lite Food & Grocery $419.20 13 2.4 409 SKU-002457
2458 Pro Clothing Product Advanced Clothing $521.34 452 3.9 248 SKU-002458
2459 Professional Electronics Product Advanced Electronics $466.77 224 3.7 26 SKU-002459
2460 Super Electronics Product Special Edition Electronics $332.94 114 3.4 286 SKU-002460
2461 Pro Books Product Classic Books $724.48 283 2.4 413 SKU-002461
2463 Pro Health & Beauty Product Classic Health & Beauty $136.90 374 4.4 725 SKU-002463
2465 Ultra Food & Grocery Product Classic Food & Grocery $448.85 227 3.4 397 SKU-002465
2466 Standard Books Product Plus Books $941.97 227 3.0 300 SKU-002466
2468 Economy Electronics Product Pro Electronics $777.40 473 1.9 858 SKU-002468
2469 Standard Home & Garden Product Lite Home & Garden $814.77 199 1.9 977 SKU-002469
2470 Economy Food & Grocery Product Plus Food & Grocery $245.26 341 2.2 912 SKU-002470
2472 Ultra Sports & Outdoors Product XL Sports & Outdoors $84.62 494 1.1 658 SKU-002472
2473 Deluxe Sports & Outdoors Product Max Sports & Outdoors $690.22 48 3.2 133 SKU-002473
2474 Deluxe Sports & Outdoors Product Plus Sports & Outdoors $505.37 378 1.2 183 SKU-002474
2475 Elite Electronics Product 2024 Electronics $917.06 101 3.9 940 SKU-002475
2476 Super Home & Garden Product Lite Home & Garden $151.20 44 2.6 206 SKU-002476
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