Hasty Briefsbeta

Bilingual

How DSQL makes sure sequences scale

3 months ago
  • #database
  • #scalability
  • #postgres
  • DSQL introduces scalable sequence support, addressing the limitations of traditional Postgres sequences in distributed environments.
  • Sequences in DSQL can be created with `CACHE` values to optimize performance, with recommendations for `CACHE=1` for low throughput and `CACHE>=65536` for high scalability.
  • Experiments show significant performance improvements with high `CACHE` values, especially in bulk inserts and high-concurrency scenarios.
  • UUIDs remain a recommended alternative for applications prioritizing simplicity and avoiding sequence bottlenecks.
  • DSQL's architecture allows sequences to scale horizontally, leveraging distributed storage and compute resources to minimize contention.