Help us understand the problem. What is going on with this article?

cockroachdbでpgbenchを動かす

More than 3 years have passed since last update.

忘れそうなのでメモ。
あとpgbenchはPostgreSQLに入ってるpgbenchではないです。

  • pgbenchをbuild
$ cd $GOPATH/src/github.com/cockroachdb/cockroach/sql/pgbench/cmd/pgbenchsetup
$ go build -o pgbench main.go
  • 初期データをロード

データベース(hogeデータベース)を新規に作成して、10000件をロード。

$ ./pgbench -createdb -accounts 10000 postgresql://root@127.0.0.1:26257/hoge?sslmode=disable
Inserted 1 branch records
Inserted 10 teller records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 5000 account records
Inserted 10 history records
  • 確認
$ ./cockroachdb sql --insecure -d hoge
root@:26257> select count(*) from pgbench_accounts;
+----------+
| count(*) |
+----------+
|    10000 |
+----------+
sawada_masahiko
Database, PostgreSQLが好き。 自分のブログ(github.ioの方)に移行しました。
https://masahikosawada.github.io/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした