Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 781e086

Browse files
authored
README: example for AWS + polish existing examples
1 parent 765ef58 commit 781e086

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Currently Supported Features
3232
===
3333
* Experiments are conducted in a Docker container with extended Postgres setup
3434
* Supported Postgres versions: 9.6, 10
35+
* Postgres config specified via options, may be partial
3536
* Supported locations for experimental runs:
3637
* Any machine with Docker installed
3738
* AWS EC2:
@@ -98,23 +99,36 @@ nancy run help
9899

99100
"Hello World!"
100101
===
102+
Locally:
101103
```bash
102-
echo "create table hello_world as select i::int4 from generate_series(1, 1000000) _(i);" > ./sample.dump
103-
bzip2 ./sample.dump
104+
echo "create table hello_world as select i::int4 from generate_series(1, (10^6)::int) _(i);" > ./sample.dump
104105

105106
# "Clean run": w/o index
106107
# (seqscan is expected, total time ~150ms, depending on resources)
107108
nancy run \
108109
--run-on localhost \
109-
--workload-custom-sql "select count(1) from hello_world where i between 100000 and 100010;" \
110-
--db-dump-path file://$(pwd)/sample.dump.bz2 --tmp-path /tmp
110+
--db-dump-path file://$(pwd)/sample.dump.bz2 \
111+
--tmp-path /tmp \
112+
--workload-custom-sql "select count(1) from hello_world where i between 100000 and 100010;"
111113

112114
# Now check how a regular btree index affects performance
113115
# (expected total time: ~0.05ms)
114116
nancy run \
115117
--run-on localhost \
118+
--db-dump-path file://$(pwd)/sample.dump.bz2 \
119+
--tmp-path /tmp \
116120
--workload-custom-sql "select count(1) from hello_world where i between 100000 and 100010;" \
117-
--db-dump-path file://$(pwd)/sample.dump.bz2 --tmp-path /tmp \
118121
--target-ddl-do "create index i_hello_world_i on hello_world(i);" \
119122
--target-ddl-undo "drop index i_hello_world_i;"
120123
```
124+
125+
On AWS EC2:
126+
```bash
127+
nancy run \
128+
--run-on aws \
129+
--aws-ec2-type "i3.large" \
130+
--aws-keypair-name awskey --aws-ssh-key-path file://$(echo ~)/.ssh/awskey.pem \
131+
--db-dump-path "create table a as select i::int4 from generate_series(1, (10^9)::int) _(i);" \
132+
--workload-custom-sql "select count(1) from a where i between 10 and 20;"
133+
```
134+

0 commit comments

Comments
 (0)