Efficient Pagination with Skip/Take

Efficient pagination using OFFSET-FETCH on SQL Server.

Execution Time

18 ms

Page Size

200

Current Page

19 / 123

Total Records

24441

Items per page: 25 50 100 200

Page 19 Results Showing 3601 - 3800 of 24441

ID Name Category Price Stock Rating Reviews SKU
4047 Ultra Books Product Max Books $685.49 218 4.9 301 SKU-004047
4048 Standard Sports & Outdoors Product Classic Sports & Outdoors $131.91 134 3.5 396 SKU-004048
4049 Ultra Books Product XL Books $888.95 189 1.8 418 SKU-004049
4050 Mega Health & Beauty Product Plus Health & Beauty $340.92 86 4.0 612 SKU-004050
4051 Premium Health & Beauty Product Pro Health & Beauty $489.14 420 1.5 211 SKU-004051
4052 Economy Health & Beauty Product Special Edition Health & Beauty $33.55 104 5.0 443 SKU-004052
4053 Economy Automotive Product Plus Automotive $105.50 131 1.5 534 SKU-004053
4054 Economy Toys & Games Product Pro Toys & Games $417.83 216 2.2 801 SKU-004054
4055 Ultra Sports & Outdoors Product Special Edition Sports & Outdoors $887.67 83 4.6 176 SKU-004055
4056 Professional Books Product Mini Books $245.67 39 1.9 925 SKU-004056
4057 Premium Office Supplies Product Lite Office Supplies $723.68 159 2.8 207 SKU-004057
4058 Economy Toys & Games Product Mini Toys & Games $118.17 227 1.6 186 SKU-004058
4059 Professional Food & Grocery Product Max Food & Grocery $456.37 110 2.3 116 SKU-004059
4060 Super Toys & Games Product Advanced Toys & Games $312.17 78 1.0 921 SKU-004060
4061 Deluxe Home & Garden Product Plus Home & Garden $649.64 333 2.8 114 SKU-004061
4062 Economy Food & Grocery Product Mini Food & Grocery $806.21 5 3.8 1 SKU-004062
4063 Mega Books Product Pro Books $312.69 492 4.0 655 SKU-004063
4064 Professional Toys & Games Product XL Toys & Games $339.48 303 2.3 792 SKU-004064
4065 Mega Toys & Games Product 2024 Toys & Games $678.40 190 2.7 235 SKU-004065
4066 Elite Electronics Product XL Electronics $440.57 159 4.9 453 SKU-004066
4069 Standard Health & Beauty Product Max Health & Beauty $570.02 432 4.3 737 SKU-004069
4070 Professional Food & Grocery Product XL Food & Grocery $789.04 12 4.8 106 SKU-004070
4071 Elite Home & Garden Product Special Edition Home & Garden $322.50 176 4.0 837 SKU-004071
4072 Super Books Product Advanced Books $750.37 449 4.1 198 SKU-004072
4073 Ultra Automotive Product Advanced Automotive $65.65 340 1.9 424 SKU-004073
4074 Super Toys & Games Product Special Edition Toys & Games $242.07 184 1.1 858 SKU-004074
4075 Ultra Clothing Product Pro Clothing $537.76 309 1.4 125 SKU-004075
4076 Economy Automotive Product XL Automotive $641.04 348 2.7 551 SKU-004076
4077 Pro Health & Beauty Product Plus Health & Beauty $536.04 164 3.9 682 SKU-004077
4079 Ultra Office Supplies Product Classic Office Supplies $968.07 336 3.4 116 SKU-004079
4080 Economy Automotive Product Max Automotive $616.40 108 5.0 460 SKU-004080
4081 Deluxe Home & Garden Product 2024 Home & Garden $403.81 91 4.1 86 SKU-004081
4082 Super Home & Garden Product 2024 Home & Garden $76.28 214 4.4 438 SKU-004082
4083 Elite Toys & Games Product 2024 Toys & Games $238.79 129 4.4 335 SKU-004083
4087 Elite Sports & Outdoors Product Classic Sports & Outdoors $325.50 115 4.6 254 SKU-004087
4088 Mega Sports & Outdoors Product Plus Sports & Outdoors $924.72 219 3.3 754 SKU-004088
4089 Mega Automotive Product Pro Automotive $942.87 145 4.8 994 SKU-004089
4090 Elite Clothing Product 2024 Clothing $364.64 443 3.5 233 SKU-004090
4091 Ultra Electronics Product Mini Electronics $391.02 484 4.7 169 SKU-004091
4092 Elite Sports & Outdoors Product Advanced Sports & Outdoors $422.78 305 1.3 979 SKU-004092
4095 Pro Food & Grocery Product 2024 Food & Grocery $462.17 477 3.6 652 SKU-004095
4096 Super Books Product Advanced Books $880.89 165 3.4 612 SKU-004096
4097 Premium Clothing Product Mini Clothing $837.31 271 3.1 991 SKU-004097
4098 Economy Sports & Outdoors Product Plus Sports & Outdoors $485.85 25 3.5 116 SKU-004098
4099 Super Health & Beauty Product Plus Health & Beauty $895.53 113 2.5 43 SKU-004099
4100 Ultra Electronics Product Pro Electronics $26.75 68 3.6 288 SKU-004100
4101 Super Clothing Product Classic Clothing $881.95 458 3.8 516 SKU-004101
4102 Pro Clothing Product Special Edition Clothing $294.55 366 2.3 96 SKU-004102
4103 Elite Automotive Product Mini Automotive $291.52 338 2.9 628 SKU-004103
4104 Economy Clothing Product Classic Clothing $747.16 202 4.2 601 SKU-004104
4105 Mega Sports & Outdoors Product Special Edition Sports & Outdoors $316.86 428 3.4 575 SKU-004105
4106 Ultra Electronics Product Special Edition Electronics $907.10 67 1.6 904 SKU-004106
4108 Mega Sports & Outdoors Product Lite Sports & Outdoors $724.81 62 1.9 124 SKU-004108
4110 Elite Sports & Outdoors Product Classic Sports & Outdoors $171.44 134 1.2 78 SKU-004110
4111 Mega Sports & Outdoors Product Mini Sports & Outdoors $398.87 10 2.3 212 SKU-004111
4112 Standard Books Product 2024 Books $497.05 370 2.5 763 SKU-004112
4115 Deluxe Automotive Product Special Edition Automotive $301.20 38 4.5 20 SKU-004115
4116 Super Books Product Classic Books $494.41 84 2.4 396 SKU-004116
4117 Ultra Books Product Lite Books $466.72 402 2.3 964 SKU-004117
4118 Economy Toys & Games Product Classic Toys & Games $908.72 278 3.5 964 SKU-004118
4119 Professional Clothing Product 2024 Clothing $210.36 381 3.1 454 SKU-004119
4120 Pro Clothing Product Lite Clothing $327.20 213 2.7 575 SKU-004120
4121 Ultra Home & Garden Product Special Edition Home & Garden $575.25 216 4.4 756 SKU-004121
4122 Deluxe Office Supplies Product Advanced Office Supplies $142.06 271 3.9 299 SKU-004122
4123 Elite Electronics Product 2024 Electronics $301.90 496 1.8 330 SKU-004123
4124 Super Health & Beauty Product XL Health & Beauty $305.12 112 1.0 627 SKU-004124
4126 Mega Office Supplies Product 2024 Office Supplies $599.45 450 2.9 19 SKU-004126
4127 Deluxe Home & Garden Product XL Home & Garden $418.25 291 2.1 583 SKU-004127
4128 Standard Electronics Product Lite Electronics $159.46 262 3.8 496 SKU-004128
4130 Ultra Clothing Product Advanced Clothing $46.01 97 3.5 747 SKU-004130
4131 Elite Sports & Outdoors Product 2024 Sports & Outdoors $627.02 37 4.1 436 SKU-004131
4132 Economy Office Supplies Product Special Edition Office Supplies $844.60 189 3.0 237 SKU-004132
4133 Super Health & Beauty Product Advanced Health & Beauty $745.20 445 1.2 320 SKU-004133
4134 Mega Toys & Games Product Special Edition Toys & Games $971.52 199 1.8 632 SKU-004134
4135 Professional Office Supplies Product 2024 Office Supplies $917.72 375 2.8 855 SKU-004135
4136 Ultra Clothing Product XL Clothing $396.87 358 1.1 352 SKU-004136
4137 Economy Health & Beauty Product Mini Health & Beauty $541.98 360 2.6 21 SKU-004137
4139 Economy Electronics Product Plus Electronics $975.44 178 1.8 261 SKU-004139
4141 Standard Home & Garden Product Plus Home & Garden $677.52 195 1.4 719 SKU-004141
4143 Standard Books Product Mini Books $288.88 95 3.6 988 SKU-004143
4144 Pro Automotive Product XL Automotive $713.15 339 1.8 346 SKU-004144
4145 Elite Sports & Outdoors Product 2024 Sports & Outdoors $870.62 466 3.6 839 SKU-004145
4146 Professional Food & Grocery Product 2024 Food & Grocery $215.83 355 1.9 402 SKU-004146
4148 Deluxe Electronics Product Mini Electronics $946.31 247 1.0 660 SKU-004148
4149 Elite Home & Garden Product Pro Home & Garden $973.12 243 4.3 525 SKU-004149
4150 Elite Books Product Classic Books $422.84 24 3.1 605 SKU-004150
4151 Deluxe Health & Beauty Product Advanced Health & Beauty $566.12 488 2.6 342 SKU-004151
4152 Economy Electronics Product Special Edition Electronics $274.17 196 4.0 691 SKU-004152
4153 Ultra Books Product Advanced Books $131.76 51 4.2 11 SKU-004153
4154 Mega Books Product Lite Books $646.15 421 2.9 952 SKU-004154
4155 Ultra Home & Garden Product 2024 Home & Garden $167.26 213 3.8 272 SKU-004155
4156 Economy Clothing Product XL Clothing $482.05 131 2.4 431 SKU-004156
4157 Mega Home & Garden Product Plus Home & Garden $177.67 426 4.8 909 SKU-004157
4158 Standard Clothing Product Plus Clothing $341.16 18 3.6 481 SKU-004158
4159 Super Clothing Product Advanced Clothing $907.68 121 3.8 460 SKU-004159
4160 Pro Office Supplies Product Pro Office Supplies $12.52 133 3.1 229 SKU-004160
4162 Standard Health & Beauty Product Max Health & Beauty $939.97 53 3.2 779 SKU-004162
4164 Deluxe Sports & Outdoors Product XL Sports & Outdoors $935.52 115 3.0 914 SKU-004164
4165 Professional Home & Garden Product Max Home & Garden $988.88 344 1.0 398 SKU-004165
4166 Professional Books Product Lite Books $37.93 31 2.6 576 SKU-004166
4167 Mega Sports & Outdoors Product Classic Sports & Outdoors $142.00 57 1.8 753 SKU-004167
4168 Elite Books Product Lite Books $787.63 464 1.2 702 SKU-004168
4169 Elite Office Supplies Product Pro Office Supplies $905.27 78 2.5 458 SKU-004169
4170 Mega Clothing Product XL Clothing $14.01 100 1.6 876 SKU-004170
4171 Ultra Office Supplies Product XL Office Supplies $123.54 199 2.0 814 SKU-004171
4172 Pro Automotive Product Special Edition Automotive $212.85 292 3.3 55 SKU-004172
4173 Economy Clothing Product Max Clothing $736.17 45 3.5 695 SKU-004173
4174 Standard Home & Garden Product XL Home & Garden $190.65 126 2.6 468 SKU-004174
4175 Mega Automotive Product Lite Automotive $781.91 226 3.0 197 SKU-004175
4176 Pro Automotive Product Max Automotive $59.91 9 3.1 583 SKU-004176
4177 Economy Electronics Product Plus Electronics $470.84 113 3.5 561 SKU-004177
4178 Pro Toys & Games Product Plus Toys & Games $459.45 228 4.4 320 SKU-004178
4179 Ultra Clothing Product Mini Clothing $506.70 215 2.5 241 SKU-004179
4180 Economy Automotive Product Lite Automotive $256.10 294 1.6 534 SKU-004180
4181 Professional Clothing Product Classic Clothing $894.04 142 3.3 283 SKU-004181
4182 Elite Electronics Product Advanced Electronics $673.06 442 4.7 348 SKU-004182
4184 Professional Clothing Product Mini Clothing $50.39 470 2.7 295 SKU-004184
4185 Ultra Food & Grocery Product 2024 Food & Grocery $984.49 209 4.5 908 SKU-004185
4186 Mega Books Product Classic Books $754.30 265 3.3 966 SKU-004186
4187 Economy Food & Grocery Product Advanced Food & Grocery $448.35 475 1.4 827 SKU-004187
4188 Deluxe Health & Beauty Product Lite Health & Beauty $194.85 353 3.4 179 SKU-004188
4189 Super Home & Garden Product Pro Home & Garden $322.68 494 2.7 293 SKU-004189
4190 Deluxe Health & Beauty Product Special Edition Health & Beauty $163.31 373 4.1 858 SKU-004190
4191 Elite Clothing Product Classic Clothing $936.24 54 4.8 798 SKU-004191
4192 Pro Food & Grocery Product 2024 Food & Grocery $780.86 132 4.9 278 SKU-004192
4193 Economy Books Product Max Books $301.10 457 3.2 524 SKU-004193
4194 Standard Books Product Mini Books $791.36 112 1.1 101 SKU-004194
4195 Premium Toys & Games Product Special Edition Toys & Games $563.26 381 1.2 906 SKU-004195
4196 Mega Automotive Product Advanced Automotive $685.29 353 1.7 941 SKU-004196
4197 Mega Food & Grocery Product Advanced Food & Grocery $528.27 232 1.7 492 SKU-004197
4198 Elite Home & Garden Product Max Home & Garden $564.50 302 4.8 993 SKU-004198
4199 Deluxe Office Supplies Product Max Office Supplies $317.13 444 2.5 87 SKU-004199
4200 Super Sports & Outdoors Product Plus Sports & Outdoors $288.33 462 3.5 975 SKU-004200
4201 Deluxe Toys & Games Product Classic Toys & Games $818.56 232 3.5 118 SKU-004201
4202 Standard Office Supplies Product Pro Office Supplies $899.58 271 1.6 705 SKU-004202
4203 Ultra Clothing Product XL Clothing $482.97 199 1.0 265 SKU-004203
4204 Elite Home & Garden Product Lite Home & Garden $690.39 492 3.2 838 SKU-004204
4205 Ultra Office Supplies Product Advanced Office Supplies $835.10 359 3.5 102 SKU-004205
4206 Professional Home & Garden Product XL Home & Garden $196.32 399 2.3 979 SKU-004206
4207 Deluxe Health & Beauty Product XL Health & Beauty $577.89 186 1.1 905 SKU-004207
4208 Elite Clothing Product 2024 Clothing $928.56 224 4.0 778 SKU-004208
4209 Standard Toys & Games Product Plus Toys & Games $687.63 394 2.1 165 SKU-004209
4211 Elite Clothing Product 2024 Clothing $56.90 264 3.4 459 SKU-004211
4212 Mega Health & Beauty Product Max Health & Beauty $343.94 318 3.7 270 SKU-004212
4213 Professional Electronics Product Advanced Electronics $262.17 31 1.2 300 SKU-004213
4214 Mega Sports & Outdoors Product Advanced Sports & Outdoors $966.78 249 1.2 224 SKU-004214
4215 Economy Clothing Product XL Clothing $153.39 242 4.0 426 SKU-004215
4216 Super Home & Garden Product Lite Home & Garden $243.27 143 1.3 734 SKU-004216
4217 Mega Books Product Advanced Books $726.46 56 1.7 33 SKU-004217
4218 Standard Electronics Product 2024 Electronics $63.56 470 4.9 808 SKU-004218
4220 Mega Sports & Outdoors Product Max Sports & Outdoors $198.09 465 3.4 245 SKU-004220
4221 Elite Home & Garden Product 2024 Home & Garden $587.33 313 3.0 680 SKU-004221
4222 Super Office Supplies Product Lite Office Supplies $150.53 195 1.3 848 SKU-004222
4223 Professional Toys & Games Product Lite Toys & Games $797.00 318 4.4 571 SKU-004223
4224 Pro Clothing Product Advanced Clothing $223.50 497 4.6 414 SKU-004224
4225 Economy Food & Grocery Product Max Food & Grocery $697.29 393 2.4 454 SKU-004225
4226 Professional Sports & Outdoors Product Advanced Sports & Outdoors $398.68 494 1.9 651 SKU-004226
4227 Ultra Automotive Product 2024 Automotive $282.98 343 4.2 590 SKU-004227
4228 Deluxe Food & Grocery Product Advanced Food & Grocery $42.31 335 3.1 430 SKU-004228
4229 Economy Home & Garden Product 2024 Home & Garden $863.10 492 1.7 170 SKU-004229
4231 Standard Automotive Product Pro Automotive $62.44 42 5.0 365 SKU-004231
4232 Deluxe Electronics Product Lite Electronics $201.06 470 1.4 597 SKU-004232
4233 Deluxe Food & Grocery Product Max Food & Grocery $483.17 127 4.7 263 SKU-004233
4234 Premium Clothing Product Mini Clothing $370.11 130 2.7 725 SKU-004234
4235 Pro Toys & Games Product Special Edition Toys & Games $898.49 181 4.3 282 SKU-004235
4237 Economy Home & Garden Product Mini Home & Garden $558.05 349 1.0 902 SKU-004237
4238 Pro Home & Garden Product Lite Home & Garden $183.12 335 1.0 493 SKU-004238
4239 Mega Office Supplies Product Advanced Office Supplies $342.15 68 4.3 571 SKU-004239
4240 Ultra Automotive Product Plus Automotive $962.98 359 4.2 438 SKU-004240
4241 Mega Automotive Product Mini Automotive $919.39 396 3.7 457 SKU-004241
4242 Elite Office Supplies Product 2024 Office Supplies $83.86 68 4.4 529 SKU-004242
4243 Elite Books Product XL Books $303.44 327 2.8 473 SKU-004243
4244 Pro Automotive Product Special Edition Automotive $727.81 122 2.6 916 SKU-004244
4245 Premium Toys & Games Product Max Toys & Games $44.76 161 1.5 216 SKU-004245
4246 Premium Health & Beauty Product Pro Health & Beauty $190.79 482 4.4 542 SKU-004246
4247 Super Food & Grocery Product XL Food & Grocery $618.60 288 1.4 821 SKU-004247
4248 Economy Electronics Product XL Electronics $354.68 244 2.0 418 SKU-004248
4249 Ultra Books Product Plus Books $987.64 95 2.5 42 SKU-004249
4250 Pro Health & Beauty Product Plus Health & Beauty $643.28 178 2.2 719 SKU-004250
4251 Deluxe Health & Beauty Product Mini Health & Beauty $176.20 451 4.8 167 SKU-004251
4252 Deluxe Office Supplies Product 2024 Office Supplies $922.39 319 3.1 370 SKU-004252
4253 Standard Toys & Games Product Lite Toys & Games $537.40 379 2.4 321 SKU-004253
4254 Elite Books Product XL Books $565.89 379 4.0 677 SKU-004254
4255 Super Clothing Product 2024 Clothing $632.02 74 2.1 719 SKU-004255
4257 Premium Sports & Outdoors Product Special Edition Sports & Outdoors $747.32 354 3.5 631 SKU-004257
4258 Standard Health & Beauty Product Max Health & Beauty $148.08 195 4.3 674 SKU-004258
4259 Ultra Electronics Product Mini Electronics $456.35 166 4.0 500 SKU-004259
4260 Ultra Electronics Product Lite Electronics $213.26 484 2.8 963 SKU-004260
4261 Elite Toys & Games Product Advanced Toys & Games $321.08 377 1.3 979 SKU-004261
4262 Super Electronics Product XL Electronics $317.26 49 2.8 702 SKU-004262
4263 Ultra Health & Beauty Product Lite Health & Beauty $783.75 338 2.5 915 SKU-004263
4264 Standard Books Product Classic Books $161.16 3 2.6 729 SKU-004264
4265 Ultra Electronics Product Mini Electronics $888.78 151 1.7 217 SKU-004265
4266 Pro Toys & Games Product Lite Toys & Games $230.69 482 1.1 354 SKU-004266
4267 Mega Office Supplies Product Plus Office Supplies $438.55 206 1.4 187 SKU-004267
4268 Professional Health & Beauty Product Lite Health & Beauty $252.20 7 1.3 802 SKU-004268
4269 Premium Books Product Mini Books $508.38 374 2.5 464 SKU-004269
4270 Mega Clothing Product Classic Clothing $810.57 416 3.4 610 SKU-004270
4271 Professional Sports & Outdoors Product Advanced Sports & Outdoors $143.12 404 3.9 926 SKU-004271
4272 Deluxe Office Supplies Product Pro Office Supplies $810.92 113 2.6 893 SKU-004272
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