jedahuJ
Convex Community16mo ago
4 replies
jedahu

My app needs client generated ids. To

My app needs client generated ids. To prevent between-user clashes I need to either generate an id like <user-id>-<uuid> or have the db record store the user id as well as the generated id. In the first case the index part of the query would be q.eq('clientId', '<user-id>-<uuid>'), and in the second q.eq('userId', '<user-id>').eq('clientId', '<uuid>'). Are there any significant performance considerations either way?
Was this page helpful?