Using uuid instead of varchar(36), the size of the uuid field is 40% smaller on disk, the size of the btree index is 50% smaller.
For instance a column of varchar(36) with a btree index on 1m lines takes 134 MB:
- 72 MB of data
- 62MB of index
While the same value using uuid takes 80 MB :
- 46 MB of data
- 33 MB of index
This reduce the memory footprint of the database. Furthermore having numeric value and smaller index should be more efficient.
This should be used as the default for new instance, the code should keep backward compatibility with doc id stored as varchar(36).
Also update of varchar index tend to bloat while btree index on number or uuid stay compact.
- is required by
-
NXP-10894 Allow use of auto-generated integers for VCS doc ids on PostgreSQL
- Resolved