2022-09-06から1日間の記事一覧

シーケンスのキャッシュ

DB

MySQL (8.0.29)https://dev.mysql.com/doc/refman/8.0/ja/innodb-auto-increment-handling.html#innodb-auto-increment-lock-modes select @@innodb_autoinc_lock_mode; 0 -> 従来型1 -> 連続2 -> インターリーブ デフォルトは2で、複数のステートメントを同…

シーケンス値変更

DB

MySQL (8.0.29) -- 1. シーケンス作成drop table tab1; create table tab1(col1 int primary key auto_increment)auto_increment=50; insert into tab1 values();select * from tab1; -- 2. シーケンス値設定 alter table tab1 auto_increment = 100; ※次に…