---
title: "Discussion on \"Firestore Offset vs. Cursor Pagination: Cut Read Costs\" | Hashnode"
description: "Discussion on \"Firestore Offset vs. Cursor Pagination: Cut Read Costs\". Firestore bills for every skipped document in offset queries. Learn how cursor-based pagination with startAfter() eliminates unnecessary read costs."
url: "https://hashnode.com/posts/firestore-offset-vs-cursor-pagination/6b040f4ad3e5de8e33be9849"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Firestore Offset vs. Cursor Pagination: Cut Read Costs](https://doogal.dev/firestore-offset-vs-cursor-pagination?utm_source=hashnode&utm_medium=feed)

Firestore bills for every skipped document in offset queries. Learn how cursor-based pagination with startAfter() eliminates unnecessary read costs.

1d ago · 5 min read · doogal.dev  
Read the article

-   [#firebase](https://hashnode.com/tag/firebase)
-   [#firestore](https://hashnode.com/tag/firestore)
-   [#database](https://hashnode.com/tag/database)
-   [#backend](https://hashnode.com/tag/backend)

## Written by

[Doogal Simpson](https://hashnode.com/@doogal)

@doogal

  
[View profile](https://hashnode.com/@doogal)

"hey doogal, what is .... ?"

## Responses 1

Markdown supported · ⌘↵ to post

[SMTasker](https://hashnode.com/@smtasker)

[8h ago](https://hashnode.com/posts/firestore-offset-vs-cursor-pagination/6b040f4ad3e5de8e33be9849/comment/6b056b4e124c4d1e32f6dd51)

I would bind a saved cursor to the filter and ordering that produced it, then clear it when either changes. A useful UI fixture is: load page one of pending orders, advance, switch to completed orders, and assert that the old pending-order anchor is not reused. It checks the handoff between query state and pagination state, even when the cursor itself is a valid document snapshot.
