<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-we-do-indices-in-foundationdb-7qhjegqiy" -->

---
title: How we do indices in FoundationDB | daily.dev
description: Tigris builds database indices on top of FoundationDB to avoid slow full table scans when querying object metadata. Object Metadata Queries let users filter...
canonical: https://daily.dev/posts/how-we-do-indices-in-foundationdb-7qhjegqiy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How we do indices in FoundationDB | daily.dev
og:description: Tigris builds database indices on top of FoundationDB to avoid slow full table scans when querying object metadata. Object Metadata Queries let users filter...
og:url: https://daily.dev/posts/how-we-do-indices-in-foundationdb-7qhjegqiy
og:image: https://api.daily.dev/og/posts/7QHJEGQiy.png
og:image:alt: How we do indices in FoundationDB
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How we do indices in FoundationDB

**[Tigris](https://daily.dev/sources/tigris)** · 8 min read · 0 upvotes · 0 comments

## Summary

Tigris builds database indices on top of FoundationDB to avoid slow full table scans when querying object metadata. Object Metadata Queries let users filter and sort ListObjectsV2 results by Last-Modified, Content-Type, and Content-Length, but only Last-Modified has an actual index right now. Tigris stores index entries as FoundationDB keys rather than values, so a key range query can be answered with a single get_range call plus a point read per result. FoundationDB transactions can't run longer than 5 seconds or write more than 10 MB, which makes full table scans especially costly there. Every write to an object also writes an index key, and stale index entries get skipped and queued for cleanup.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.tigrisdata.com/blog/fdb-indices>

## Questions this post answers

### How does Tigris implement database indices on top of FoundationDB?

Tigris stores indices as separate FoundationDB keyspaces, writing an index key alongside the object data in the same transaction. Unlike a typical index design, the indexed value is encoded into the FoundationDB key itself rather than the value, so a range of entries can be read with a single get_range call instead of recursive value lookups.

_Developers designing indexing schemes on key-value stores can track patterns like this on daily.dev._

### What are the transaction limits in FoundationDB and why do they matter for query design?

FoundationDB transactions cannot run for more than five seconds or write more than 10 MB. This makes full table scans especially costly, since a scan that exceeds these limits requires rearchitecting rather than just optimizing, which is why Tigris builds explicit indices for fields like Last-Modified instead of relying on scans.

_Anyone architecting around FoundationDB's constraints can follow coverage of distributed database design on daily.dev._

### Which fields can I filter and sort on with Tigris Object Metadata Queries, and which ones are actually indexed?

Tigris Object Metadata Queries support filtering and ordering ListObjectsV2 results by Last-Modified, Content-Type, and Content-Length, but only Last-Modified currently has a backing index. Queries on Content-Type or Content-Length still work but do not benefit from index-based lookups the way Last-Modified queries do.

_Developers choosing an S3-compatible storage layer can weigh query capabilities like these on daily.dev._

## Similar posts on daily.dev

- [Building a global object store on FoundationDB](https://daily.dev/posts/building-a-global-object-store-on-foundationdb-1asqsxycj) · Tigris · 1 upvotes · 0 comments
- [Immutable by Design: The Deep Tech Behind Tigris Bucket Forking](https://daily.dev/posts/immutable-by-design-the-deep-tech-behind-tigris-bucket-forking-trkgo78e3) · Tigris · 1 upvotes · 0 comments
- [Introduction to PostgreSQL Indexes ::](https://daily.dev/posts/introduction-to-postgresql-indexes--peasixbnz) · Hacker News · 0 upvotes · 0 comments
- [How Bucket Forking Brings GitHub-Style Forking To Object Storage](https://daily.dev/posts/how-bucket-forking-brings-github-style-forking-to-object-storage-perbev2qb) · The New Stack · 0 upvotes · 0 comments
- [Building high-performance full-text search for object storage](https://daily.dev/posts/building-high-performance-full-text-search-for-object-storage-l0orx1vdy) · ClickHouse · 1 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#distributed-systems](https://daily.dev/tags/distributed-systems)

[View this post on daily.dev](https://daily.dev/posts/how-we-do-indices-in-foundationdb-7qhjegqiy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How we do indices in FoundationDB","url":"https://daily.dev/posts/how-we-do-indices-in-foundationdb-7qhjegqiy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-we-do-indices-in-foundationdb-7qhjegqiy"},"datePublished":"2026-10-27T15:15:57.773Z","dateModified":"2026-10-27T15:21:56.311Z","description":"Tigris builds database indices on top of FoundationDB to avoid slow full table scans when querying object metadata. Object Metadata Queries let users filter...","image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","thumbnailUrl":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","isAccessibleForFree":true,"articleSection":"Tigris","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Tigris","logo":"https://media.daily.dev/image/upload/s--A5ku_6TS--/f_auto/v1716186679/logos/tigris","url":"https://daily.dev/sources/tigris"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-we-do-indices-in-foundationdb-7qhjegqiy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,distributed-systems","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Tigris","item":"https://daily.dev/sources/tigris"},{"@type":"ListItem","position":3,"name":"How we do indices in FoundationDB"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-we-do-indices-in-foundationdb-7qhjegqiy#faq","mainEntity":[{"@type":"Question","name":"How does Tigris implement database indices on top of FoundationDB?","acceptedAnswer":{"@type":"Answer","text":"Tigris stores indices as separate FoundationDB keyspaces, writing an index key alongside the object data in the same transaction. Unlike a typical index design, the indexed value is encoded into the FoundationDB key itself rather than the value, so a range of entries can be read with a single get_range call instead of recursive value lookups. Developers designing indexing schemes on key-value stores can track patterns like this on daily.dev."}},{"@type":"Question","name":"What are the transaction limits in FoundationDB and why do they matter for query design?","acceptedAnswer":{"@type":"Answer","text":"FoundationDB transactions cannot run for more than five seconds or write more than 10 MB. This makes full table scans especially costly, since a scan that exceeds these limits requires rearchitecting rather than just optimizing, which is why Tigris builds explicit indices for fields like Last-Modified instead of relying on scans. Anyone architecting around FoundationDB's constraints can follow coverage of distributed database design on daily.dev."}},{"@type":"Question","name":"Which fields can I filter and sort on with Tigris Object Metadata Queries, and which ones are actually indexed?","acceptedAnswer":{"@type":"Answer","text":"Tigris Object Metadata Queries support filtering and ordering ListObjectsV2 results by Last-Modified, Content-Type, and Content-Length, but only Last-Modified currently has a backing index. Queries on Content-Type or Content-Length still work but do not benefit from index-based lookups the way Last-Modified queries do. Developers choosing an S3-compatible storage layer can weigh query capabilities like these on daily.dev."}}]}
```

