You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a distributed context sequences add more relative overhead as getting one (or more) new value(s) requires global locking.
Therefore, for practical performance we recommend using a higher CACHE value (or a type with a unique value generator like UUID, instead).
However, in some cases, large schemas are exported from other systems (e.g. vanilla Postgres) many sequences with CACHE explicitly set to low values (e.g. 1). This is because, even when the cache option was not specified on sequence creation, its value (the vanilla Postgres default 1) will be made explicit when exporting it (therefore being specified in the SQL dump file for each sequence).
To improve usability for such migration use-cases, we should add a tserver flag ysql_sequence_cache_minval (default 100) that will override the chosen cache value for a sequence (and log a message to the user), if it is lower than the set flag.
The text was updated successfully, but these errors were encountered:
In a distributed context sequences add more relative overhead as getting one (or more) new value(s) requires global locking.
Therefore, for practical performance we recommend using a higher
CACHE
value (or a type with a unique value generator likeUUID
, instead).However, in some cases, large schemas are exported from other systems (e.g. vanilla Postgres) many sequences with
CACHE
explicitly set to low values (e.g.1
). This is because, even when the cache option was not specified on sequence creation, its value (the vanilla Postgres default1
) will be made explicit when exporting it (therefore being specified in the SQL dump file for each sequence).To improve usability for such migration use-cases, we should add a tserver flag
ysql_sequence_cache_minval
(default100
) that will override the chosen cache value for a sequence (and log a message to the user), if it is lower than the set flag.The text was updated successfully, but these errors were encountered: