शब्दकोश · प्रोग्रामिंग

Pagination

Pagination splits a large set of results into smaller pages that are returned or displayed one at a time, using offsets, page numbers or cursors.

अपडेट: अक्टूबर 6, 2026

Pagination is the practice of dividing a large list of results into smaller chunks, called pages, that are fetched and shown one at a time. It applies to web page listings, database queries and API responses alike.

Why it matters

Returning thousands of rows at once wastes bandwidth, memory and time. Pagination keeps responses fast and predictable. Two common styles exist. Offset pagination uses page and limit (or OFFSET), which is simple but gets slower on deep pages and can skip or repeat items if data changes between requests. Cursor pagination returns a token pointing to the last item seen, which stays efficient and consistent for large or fast-changing data. For websites, crawlable paginated links also matter to search engines.

Example

GET /api/sites?limit=50&cursor=eyJpZCI6MTIzfQ

{
  "data": [ ... 50 items ... ],
  "next_cursor": "eyJpZCI6MTczfQ"
}
SELECT * FROM sites WHERE id > 123 ORDER BY id LIMIT 50;

Common mistakes

  • Paginating without a stable sort order, so pages overlap.
  • Using large OFFSET values on huge tables.
  • Not enforcing a maximum page size.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.