t11sT
Convex Community10mo ago
7 replies
t11s

Is querying by indexed custom ID as fast as querying by Convex's internal _id?

In my Convex database, I have a couple tables that have a custom unique
provider_id
that comes from an external service I sync with.

I frequently need to query by
provider_id
in both actions and frontend code.

My question: If I create an index on
provider_id
, will queries using it (e.g. getting the unique document identified by
provider_id
) perform just as fast as queries using the internal
_id
? Or does Convex have special optimizations for
_id
that make it faster than any other indexed field?
Was this page helpful?