2022-02-01から1ヶ月間の記事一覧

サブクエリと結合ヒント句

DB

MySQL (8.0.26) https://qiita.com/hmatsu47/items/e473a3e566b910d61f5b -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;creat…

サブクエリとアクセスヒント句

DB

MySQL (8.0.26)-- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;create table tab3( col1 bigint ,col2 bigint ); drop procedur…

サブクエリとleadingヒント句

DB

MySQL (8.0.26)-- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;create table tab3( col1 bigint ,col2 bigint ); drop procedur…

ビューとleadingヒント句

DB

MySQL (8.0.26) -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;create table tab3( col1 bigint ,col2 bigint ); drop procedu…

インラインビューとleadingヒント句

DB

MySQL (8.0.26) -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;create table tab3( col1 bigint ,col2 bigint ); drop procedu…

ビューとアクセスヒント句

DB

MySQL (8.0.26) drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;create table tab3( col1 bigint ,col2 bigint ); drop procedure proc1; delimiter //c…

ビューと結合ヒント句

DB

MySQL (8.0.26) https://qiita.com/hmatsu47/items/e473a3e566b910d61f5b drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;create table tab3( col1 bigi…

インラインビューとアクセスヒント句

DB

MySQL (8.0.26) -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;create table tab3( col1 bigint ,col2 bigint ); drop procedu…

インラインビューと結合ヒント句

DB

MySQL (8.0.26) https://dev.mysql.com/doc/refman/8.0/ja/hash-joins.htmlhttps://qiita.com/hmatsu47/items/e473a3e566b910d61f5b -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table …

WebLogic Serverインストール

OS

Ubuntu (18) ※なぜかUbuntu20の場合、サービス起動時に途中でとまる 前提:jdk1.8.0_321 jdk-8u321-linux-x64.tar.gzOracle WebLogic Server 14c (14.1.1.0) fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zipGUI追加済 -- 1. JDKインストール https://www.oracle.com/…

{CloudWatch}CPU 使用率アラームの作成

AWS

https://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/US_AlarmAtThresholdEC2.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscl…

deleteとinsertの速度比較

DB

Oracleはinsertのほうが早いMySQL,PostgreSQL,SQL Serverはdeleteのほうが早い MySQL (8.0.26) -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 varchar(1000) ,col3 varchar(1000) ,col4 varchar(1000) ,col5 varchar(1000) …

HJでのインデックスフルスキャンとテーブルフルスキャンの比較

DB

MySQL (8.0.26) -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 varchar(1000)-- ,col3 varchar(1000)-- ,col4 varchar(1000)-- ,col5 varchar(1000)-- ,col6 varchar(1000)-- ,col7 varchar(1000)-- ,col8 varchar(1000)-- …

{Lambda}チュートリアル: クロスアカウント Amazon SQS キューをイベントソースとして使用する

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/with-sqs-cross-account-example.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"un…

{Lambda}チュートリアル: Amazon SQS で Lambda の使用

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/with-sqs-example.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.z…

{Lambda}チュートリアル: Amazon Simple Notification Service での AWS Lambda の使用

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/with-sns-example.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.z…

{Lambda}チュートリアル: Amazon S3 トリガーを使用してサムネイル画像を作成する

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/with-s3-tutorial.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.z…

ヒント句の分割指定

DB

MySQL (8.0.26) drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop procedure proc1; delimiter //create procedure proc1(in x int)begin declare i int; set i = 0; …

{Lambda}チュートリアル: Amazon S3 トリガーを使用して Lambda 関数を呼び出す

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/with-s3-example.htmlhttps://dev.classmethod.jp/articles/tsnote-lambda-s3-event-trigger/ -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.…

in句件数の実行計画への影響

DB

MySQL (8.0.26) drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop procedure proc1; delimiter //create procedure proc1(in x int)begin declare i int; set i = 0; …

select句にSQLを書く場合とJOINする場合の比較

DB

MySQL (8.0.26) -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop procedure proc1; delimiter //create procedure proc1(in x int)begin dec…

ヒント句一覧

DB

MySQL (8.0.26) インデックスヒントhttps://dev.mysql.com/doc/refman/8.0/ja/index-hints.html USE INDEXIGNORE INDEXFORCE INDEX オプティマイザヒントhttps://dev.mysql.com/doc/refman/8.0/ja/optimizer-hints.html BKANO_BKABNLNO_BNLDERIVED_CONDITION…

{Lambda}チュートリアル: Amazon VPC の Amazon RDS にアクセスする Lambda 関数の設定

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/services-rds-tutorial.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscl…

{Lambda}チュートリアル: Amazon Kinesis で AWS Lambda を使用する

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/with-kinesis-example.htmlhttps://qiita.com/fnaoto/items/0ef92551c8f19351a3a3 -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-…

{Lambda}チュートリアル: Amazon VPC の Amazon ElastiCache にアクセスする Lambda 関数の設定

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/services-elasticache-tutorial.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unz…

{Lambda}チュートリアル: Amazon DynamoDB Streams で AWS Lambda を使用する

AWS

-- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.zipsudo ./aws/install aws --version -- 1.2 jqインストールsudo yum -y insta…

{Lambda}チュートリアル: スケジュールされたイベントでの AWS Lambda の使用

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/services-cloudwatchevents-tutorial.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zi…

{Lambda}チュートリアル: スケジュールされたイベントでの AWS Lambda の使用

AWS

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/services-cloudwatchevents-tutorial.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zi…

シェルでおみくじファンクション

OS

Ubuntu (20)引数: コロン区切りの発生比率戻り値: 該当インデックス番号(1始まり) function func1{ param1=$1 ar1=() ret=0 # 要素数をカウント item_cnt=$(echo "${param1}" |awk -F':' '{print NF}') # 要素数だけ繰り返し、発生確率を配列に格納 prob_su…

アラートログ出力先変更

DB

MySQL (8.0.26) mkdir -p /home/mysql/{general,slowquery,binlog,error}chown -R mysql:mysql /home/mysql vim /etc/my.cnf:set paste # 一般クエリログ(General query log)general_log=1general_log_file="/home/mysql/general/general.log" # スローク…