Tessera docs

Launch Tessera

Launch

Database

Indexes

Add indexes from the schema and find slow queries before your users do.

Declaring an index

schema.ts
export const tasks = table("tasks", {  id: uuid().primaryKey(),  projectId: uuid(),  createdAt: timestamp(),}).index("by_project", ["projectId", "createdAt"])

Indexes are created concurrently during migrations, so adding one never locks writes.

Finding missing indexes

The Observability tab lists queries that scanned more than 10,000 rows, along with a suggested index.

Terminal
npx tessera db advise --env production

Index types

Type

Use it for

btree (default)

Equality and range filters, sorting.

gin

json columns and full-text search.

unique

Enforcing uniqueness across one or more columns.

Was this helpful?

© 2026 Tessera, Inc.

Support

Status

Create a free website with Framer, the website builder loved by startups, designers and agencies.