# (Serverless) How do I know when my vectors become available after insertion?

**URL:** <https://community.pinecone.io/t/serverless-how-do-i-know-when-my-vectors-become-available-after-insertion/6753>\
**Category:** Support\
**Tags:** serverless\
**Created:** [October 8, 2024, 10:49pm UTC](https://community.pinecone.io/t/serverless-how-do-i-know-when-my-vectors-become-available-after-insertion/6753 "2024-10-08T22:49:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathan3](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/jonathan3/32/1387_2.png) [@jonathan3](https://community.pinecone.io/u/jonathan3)\
**Post date:** [October 8, 2024, 10:49pm UTC](https://community.pinecone.io/t/serverless-how-do-i-know-when-my-vectors-become-available-after-insertion/6753/1 "2024-10-08T22:49:52Z")

</div>

Hi,

When you insert vectors into a serverless index, it takes some time for those vectors to become available for querying. This is a known issue, but the recommended workaround is to repeatedly call `describe_index_stats` after the insertion until the total # of vectors in the namespace matches what you’d expect.

This works fine until you have multiple jobs inserting vectors into the same namespace, e.g. if you are indexing different groups of documents at the same time. The delta in _total_ vector count won’t tell you if a _specific_ indexing job is finished or not. This wouldn’t be a problem if I could use metadata filters in `describe_index_stats`, since I could just filter by job ID, but filters aren’t available in serverless indexes for some reason.

What should I do here? I could repeatedly fetch _every_ vector in the index until I get a valid response, but this seems ridiculous if you’re dealing with millions of vectors. Please let me know if there’s a better way of knowing when my vectors will actually become usable after insertion.

Thank you.

---

<div class="post-metadata">

**Author:** ![jesse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/jesse/32/1658_2.png) [@jesse](https://community.pinecone.io/u/jesse)\
**Post date:** [November 15, 2024, 7:35pm UTC](https://community.pinecone.io/t/serverless-how-do-i-know-when-my-vectors-become-available-after-insertion/6753/2 "2024-11-15T19:35:04Z")

</div>

Hi @jonathan3. Thank you for this question and sorry it’s taken so long to response.

I just posted an answer with relevant recommendations [here](https://community.pinecone.io/t/there-can-be-a-slight-delay-before-new-or-changed-records-are-visible-to-queries/4912/16). But to save you time:

If it’s essential for your use case to lock reads (queries) until you can ensure data is available, we recommend either [fetching by the ID of the record](https://docs.pinecone.io/guides/data/fetch-data) or [comparing the LSN of the write to the LSN of a query](https://docs.pinecone.io/guides/data/data-freshness/check-data-freshness#check-the-log-sequence-number). Every operation gets an LSN (log sequence number), and they are monotonically increasing, so as soon as the LSN of the query is higher than the LSN of the write, your data is available.

I know the docs recommend repeatedly calling `describe_index_stats`, which isn’t a practical or useful approach in cases like yours. I’ll make sure we update our docs.

Hope that helps. Please let me know.

Best,  
Jesse
