ablog

不器用で落着きのない技術者のメモ

2022-05-29から1日間の記事一覧

GitHub から clone しようとすると、"Permission denied (publickey). fatal: Could not read from remote repository." と怒られる

事象 GitHub から clone しようとすると、"Permission denied (publickey). fatal: Could not read from remote repository." と怒られる。 % git clone git@github.com:yoheia/redshift_concurrent_query_executer.git Cloning into 'redshift_concurrent_q…

Redshift でテーブルにアクセス権があるのに "permission denied for schema ..." と怒られる

事象 ユーザーにテーブルに対する権限を付与しているのに "permission denied for schema ..." と怒られる。 こんな感じでアクセス権を付与しているが、 % psql "host=redshift-cluster-poc.********.ap-northeast-1.redshift.amazonaws.com user=awsuser db…

よく使う pgbench のオプション

ベンチマーク用オプション -t: 指定した回数トランザクションを実行する (回数を指定) -T: 指定した秒数トランザクションを実行する(期間を指定) -c: データベースセッション数 -j: ワーカースレッド数 -f : 実行するSQLスクリプトファイル名 -r: コマン…

よく使う psql のオプション

よく使う psql のオプション -f: SQLスクリプトファイルを指定して実行する -a: 実行した SQL も出力する 実行例 psql "host=redshift-cluster-poc.********.ap-northeast-1.redshift.amazonaws.com user=awsuser dbname=dev port=5439" -a -f sample.sql 参…

macOS に pgbench をインストールする

% brew install postgres 参考 Postgres on Mac with Brew 💻. Brewing PostgreSQL on OS X | by Gopi Krishna Kancharla | Think Special — Gopi K Kancharla | Medium | Think Special — Gopi K Kancharla

Redshift でクエリを同時多重実行検証をするスクリプト

TL;DR Redshift クラスターのサイジングや Concurrency Scaling の検証などで、クエリを同時実行し、クエリ単体のレスポンス要件と複数クエリのスループット要件の両方を満たしているかを検証したりする bash スクリプト。bash スクリプトから pgbench を読…