[{"data":1,"prerenderedAt":112},["ShallowReactive",2],{"term-o\u002Foffset-pagination":3,"related-o\u002Foffset-pagination":101},{"id":4,"title":5,"acronym":6,"body":7,"category":83,"description":84,"difficulty":85,"extension":86,"letter":87,"meta":88,"navigation":89,"path":90,"related":91,"seo":95,"sitemap":96,"stem":99,"subcategory":6,"__hash__":100},"terms\u002Fterms\u002Fo\u002Foffset-pagination.md","Offset Pagination",null,{"type":8,"value":9,"toc":77},"minimark",[10,15,19,23,26,30,66,70,73],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"Offset pagination is the classic 'skip X rows and give me the next Y rows' approach. Page 3 of 20 results means skip 40 rows and give me 20. It's simple and predictable but can get slow on huge tables and can show duplicate results if data changes between pages.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Offset pagination uses LIMIT and OFFSET in SQL queries (or equivalent) to skip a specified number of records and return the next batch. Simple to implement and understand, but performance degrades on large offsets and results can be inconsistent with live data changes.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Page 3 with 20 items per page\nSELECT * FROM posts\nORDER BY created_at DESC\nLIMIT 20 OFFSET 40;\n","sql","",[38,39,40,48,54,60],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,47],{},"\u002F\u002F Page 3 with 20 items per page\n",[41,49,51],{"class":43,"line":50},2,[41,52,53],{},"SELECT * FROM posts\n",[41,55,57],{"class":43,"line":56},3,[41,58,59],{},"ORDER BY created_at DESC\n",[41,61,63],{"class":43,"line":62},4,[41,64,65],{},"LIMIT 20 OFFSET 40;\n",[11,67,69],{"id":68},"when-youll-hear-this","When You'll Hear This",[16,71,72],{},"\"Offset pagination works fine for the admin tables.\" \u002F \"Avoid offset pagination on tables with millions of rows — it's slow.\"",[74,75,76],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":50,"depth":50,"links":78},[79,80,81,82],{"id":13,"depth":50,"text":14},{"id":21,"depth":50,"text":22},{"id":28,"depth":50,"text":29},{"id":68,"depth":50,"text":69},"backend","Offset pagination is the classic 'skip X rows and give me the next Y rows' approach. Page 3 of 20 results means skip 40 rows and give me 20.","intermediate","md","o",{},true,"\u002Fterms\u002Fo\u002Foffset-pagination",[92,93,94],"Cursor Pagination","Pagination","Query Builder",{"title":5,"description":84},{"changefreq":97,"priority":98},"weekly",0.7,"terms\u002Fo\u002Foffset-pagination","qkcFUpVRnPcPlSpu1tlMJKjsO1sW-M-4clv3gQ75JP8",[102,105,109],{"title":92,"path":103,"acronym":6,"category":83,"difficulty":85,"description":104},"\u002Fterms\u002Fc\u002Fcursor-pagination","Cursor pagination uses a 'you are here' bookmark instead of page numbers. After getting results, you get a cursor (pointer) to the last item.",{"title":93,"path":106,"acronym":6,"category":83,"difficulty":107,"description":108},"\u002Fterms\u002Fp\u002Fpagination","beginner","Pagination is splitting a huge list of results into pages.",{"title":94,"path":110,"acronym":6,"category":83,"difficulty":85,"description":111},"\u002Fterms\u002Fq\u002Fquery-builder","A query builder lets you build database queries by chaining methods instead of writing raw SQL. It's like assembling a sentence with Lego blocks — `.",1776518299025]