Article · Apr 4, 2024
How to choose between the UUID and the sequential ID as the Primary key in Xano?
Choosing the appropriate primary key format is critical to the database and system’s performance, scalability and data-integrity
At the initial stage of creating the data table, Xano will ask to choose the primary key as UUID or the sequential ID.
There is no easy way I could find to change the existing table primary key from sequential ID to UUID which makes this decision more crucial.

What is UUID and Sequential ID?
Let’s understand the basic definition in easy language:
UUID: Universally Unique IDentifier commonly known as UUID is a unique ID of 32 alphanumeric characters randomly generated by xano for every row of that table.
Sequential ID: Sequential ID is a sequential integer being created for every record in an auto-incremental manner like the first row will have the primary key as 1, the second row will have the primary key as 2, and so on…
What are the characteristics of UUID and Sequential ID?
Let’s understand the basic characteristics in easy language:
UUID:
-
Single UUID occupies 128-bit storage which may cause performance issues while selecting queries and indexing
-
UUID is random and not predictable. 32 characters of UUID makes it not user-friendly
-
UUID is not very readable. For example: 6443 is much more readable than 7197a0d6-f47b-44e6-9359-c0bd034462aa
-
There will be a sense of security as malicious users cannot guess the UUID
-
UUIDs are not naturally sortable
-
UUID enables you to share data across distributed systems
-
UUID reduces the complexity of integration between databases
Sequential ID:
-
Single Sequential ID occupies far less storage than UUID which makes it more performant than UUID
-
Sequential ID is incremental and predictable which makes it more user-friendly
-
Sequential ID is naturally sortable
-
Sharing data across distributed systems will become too much painful and integration between databases
How to choose between the UUID and the sequential ID as the Primary key?
Here is how you should make the choice based on the information given above.
If you are considering data migration or data integration (between two more different databases) from Xano in the future, you should go with UUID. If not, then you can think about considering sequential ID as the primary key based on the following parameters.
If storage is not an issue and you are capable enough to optimize performance on a large scale then using UUID is not risky.
To optimize performance and storage, you should go with the sequential ID as the Primary key.
Primary keys that are not going to be exposed to users can be used UUID.
Usecase in which the primary key will be exposed to users, Users prefer simplicity. Sequential ID has more readability and readability leads to simplicity. Numbers are easy to write, easy to remember, and easy to communicate. For example, the order number that is inspected by the Support staff, Inventory management staff, etc.
If you can think of more parameters to consider while making this decision, feel free to share them in the comment section.
click here to connect with me.
After the Published Article Comments that provide more insight into this topic:

Credit: Caleb Lewallen
Frequently asked questions
When should I choose UUID over Sequential ID in Xano?
Use UUID when the table will sync data across distributed systems or external databases (where ID collisions matter), when the primary key is exposed in URLs or API responses (UUIDs are not guessable, sequential IDs are), or when you need to merge records from multiple sources without remapping. The tradeoff is 128-bit storage per key versus 32-bit, plus slower index lookups, plus no natural sort order.
When should I choose Sequential ID over UUID in Xano?
Use Sequential ID when reads and indexing performance matter (sequential integers are denser and faster to index than 32-character UUIDs), when humans need to read the ID ('order #6443' versus '7197a0d6-f47b-44e6-9359-c0bd034462aa'), or when natural insertion order should be the default sort. The tradeoff is that record IDs are guessable, which is a real risk if the ID is exposed in a public URL without an extra authorization check.
Can I change a Xano table's primary key from Sequential ID to UUID later?
No clean migration path. Xano locks the primary-key type at table creation. Migrating after the fact means creating a new table with the right type, copying data with a script, repointing every foreign-key reference across related tables, then dropping the original. This is invasive enough that getting the choice right at creation is the only practical play.
Are UUIDs less performant than Sequential IDs in Xano?
Yes, on writes and on indexed reads, though the gap is small at modest scale. UUIDs occupy 128 bits versus 32 for a sequential integer, so the primary-key index is roughly 4x larger and sequential inserts cause more B-tree rebalancing. At ten-million-row scale the difference shows up in p99 query latency; at one-hundred-thousand-row scale it is invisible.
Are sequential IDs in Xano a security risk?
They are a risk only when the ID is exposed in a URL or API response without an authorization check. The IDOR (insecure direct object reference) pattern is exactly this: a user changes '/orders/6443' to '/orders/6444' and sees another customer's order. With UUIDs the URL is not guessable; with sequential IDs you must enforce authorization in every endpoint that accepts an ID parameter. Both approaches work; UUIDs just remove one class of mistake.