Android: Use UUID as primary key in SQLite

前端 未结 2 1725
时光说笑
时光说笑 2020-12-24 06:02

My app needs to get synced with other app users (on there own devices). I also want to support offline editing, that are synchronized to the other collaborative users when t

2条回答
  •  鱼传尺愫
    2020-12-24 06:41

    One set of performance results for UUIDs as binary and text can be found in somewhat related UUID/SQLite question: https://stackoverflow.com/a/11337522/3103448

    Per the results, both binary and string UUIDs can be efficient in SQLite for Create and Query when indexed. A separate trade-off is whether a human readable string is preferred to the smaller data size of binary file size.

提交回复
热议问题