2021-12-01から1ヶ月間の記事一覧

ダイレクトパス

DB

MySQL (8.0.27) LOAD DATA文がダイレクトパスの動作をしている可能性がないか調査 -- テストテーブル作成drop table tab1;create table tab1( col1 int ,col2 char(100) ,col3 char(100) ); drop procedure proc1; delimiter //create procedure proc1(in x …

{CloudFormation}スタックポリシー

AWS

https://dev.classmethod.jp/articles/disable-update-stack/ スタックポリシーを使用すると、スタックの更新中にスタックのリソースが意図せずに更新または削除されるのを防止できます。スタックポリシーは、指定したリソースに対して実行できる更新アクシ…

{CloudFormation}cfn-init

AWS

https://dev.classmethod.jp/articles/cfn-helper-scripts/ cfn-init ヘルパースクリプトは、AWS::CloudFormation::Init キーからテンプレートメタデータを読み取り、それに応じて次のような操作を行います。・AWS CloudFormation のメタデータの取得と解析…

{CloudFormation}カスタムリソース

AWS

https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/walkthrough-custom-resources-lambda-lookup-amiids.html カスタムリソースを使用すると、テンプレートにカスタムのプロビジョニングロジックを記述し、ユーザーがスタックを作成、…

データ更新時のundo使用量

DB

MySQL (8.0.27) -- 1. テストテーブル準備drop table tab1;create table tab1( col1 int primary key ,col2 char(100) ,col3 char(100) ); drop procedure proc1; delimiter //create procedure proc1(in x int)begin declare i int; set i = 0; start trans…

インデックス作成時のtemp使用量

DB

MySQL (8.0.27) https://dev.mysql.com/doc/refman/8.0/ja/temporary-files.html -- 1. テストテーブル準備drop table tab1;create table tab1( col1 char(85) ,col2 char(85) ,col3 char(85) ,col4 char(85) ,col5 char(85) ,col6 char(85) ,col7 char(85) …

データ圧縮サイズ見積

DB

MySQL (8.0.27) 調べた限り、圧縮サイズ見積機能はない模様 Oracle (19c)https://blogs.oracle.com/otnjp/post/shibacho-014 -- 1. 非圧縮テーブル作成 drop table tab1 purge;create table tab1 (col1 int, col2 date, col3 varchar2(100) ); -- 1.1 ランダ…

{CloudFormation}シークレットマネージャからパスワード取得

AWS

https://techblog.zozo.com/entry/pass_secrets_to_cloudformation -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.zipsudo ./a…

パーティションインデックス

DB

MySQL (8.0.27)https://dev.mysql.com/doc/refman/8.0/ja/partitioning-overview.html drop table tab1; create table tab1( col1 int primary key, col2 int, col3 int, col4 int) partition by range (col1) ( partition p1 values less than (0) , partit…

モデルデータベース

DB

MySQL (8.0.27) モデルデータベースに相当するものは調べた限りない模様 Oracle (19c) PDB$SEEDは読込専用でオブジェクトの追加等はできない PostgreSQL (14)https://db.just4fun.biz/?PostgreSQL/template0%E3%81%A8template1%E3%81%AE%E9%81%95%E3%81%84%E…

カラム順が異なるテーブルへのデータインポート

DB

MySQL (8.0.27) ※complete-insertオプション付与によりカラム定義もinsert文に含まれる drop table tab1;create table tab1(col1 int,col2 int);insert into tab1 values(1,2);select * from tab1; \! mysqldump --complete-insert -uroot -p -t test tab1 >…

{CloudFormation}S3作成

AWS

https://dev.classmethod.jp/articles/cloudformation-s3bucket-type/ -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.zipsudo …

{CloudFormation}RDS作成

AWS

https://qiita.com/okubot55/items/87d4bd7a3649992bc5f7 下記はデフォルトを使用するパラメータグループサブネットグループセキュリティグループ -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.co…