Hey, I'm using uuid as PK for my users table and I would like to use cursor based pagination. Is that possible with uuid or do I need to add another unique column that's incremental?
✅ 1
j
Jarupong
09/24/2022, 1:41 PM
Hi Kenny, I suggest you to use auto increment if you want cursor base pagiantion. UUID I can say that it's possible but it's will not be good in long term because it cannot identify as sequential values.
Jarupong
09/24/2022, 1:42 PM
because cursor base you have orderBy your cursor field
Jarupong
09/24/2022, 1:43 PM
but you can create composite index like UUID with sequential values(eg. createdAt, updatedAt)