diff --git a/_includes/start_in_docker/mac-linux-steps.md b/_includes/start_in_docker/mac-linux-steps.md
index c57654b5e5c..948fce54450 100644
--- a/_includes/start_in_docker/mac-linux-steps.md
+++ b/_includes/start_in_docker/mac-linux-steps.md
@@ -1,12 +1,14 @@
-## Watch a Demo
+## Before You Begin
-Feel free to watch this process in action before going through the steps yourself. Note that you can copy commands directly from the video, and you can use **<** and **>** to go back and forward.
+Make sure you have already [installed the official CockroachDB Docker image](install-cockroachdb.html).
+
+Also, feel free to watch this process in action before going through the steps yourself. Note that you can copy commands directly from the video, and you can use **<** and **>** to go back and forward.
--cache
flag in the start
command.{{site.data.alerts.end}}
-## Step 3. Start additional containers/nodes
+## Step 3. Add nodes to the cluster
+
+At this point, your cluster is live and operational. With just one node, you can already connect a SQL client and start building out your database. In real deployments, however, you'll always want 3 or more nodes to take advantage of CockroachDB's [automatic replication](demo-data-replication.html), [rebalancing](demo-automatic-rebalancing.html), and [fault tolerance](demo-fault-tolerance-and-recovery.html) capabilities.
+
+To simulate a real deployment, scale your cluster by adding two more nodes:
~~~ shell
# Start the second container/node:
@@ -64,9 +70,9 @@ These commands add two more containers and start CockroachDB nodes inside them,
- `-v`: This flag mounts a host directory as a data volume. Data and logs for these nodes will be stored in `${PWD}/cockroach-data/roach2` and `${PWD}/cockroach-data/roach3` on the host and will persist after the containers are stopped or deleted.
- `--join`: This flag joins the new nodes to the cluster, using the first container's `hostname`. Otherwise, all [`cockroach start`](start-a-node.html) defaults are accepted. Note that since each node is in a unique container, using identical default ports won’t cause conflicts.
-## Step 4. Use the built-in SQL client
+## Step 4. Test the cluster
-Use the `docker exec` command to start the [built-in SQL shell](use-the-built-in-sql-client.html) in the first container:
+Now that you've scaled to 3 nodes, you can use any node as a SQL gateway to the cluster. To demonstrate this, use the `docker exec` command to start the [built-in SQL shell](use-the-built-in-sql-client.html) in the first container:
~~~ shell
$ docker exec -it roach1 ./cockroach sql
@@ -75,33 +81,15 @@ $ docker exec -it roach1 ./cockroach sql
# To exit: CTRL + D.
~~~
-Then run some [CockroachDB SQL statements](learn-cockroachdb-sql.html):
+Run some basic [CockroachDB SQL statements](learn-cockroachdb-sql.html):
~~~ sql
> CREATE DATABASE bank;
-~~~
-
-~~~
-CREATE DATABASE
-~~~
-~~~ sql
> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);
-~~~
-~~~
-CREATE TABLE
-~~~
-
-~~~ sql
> INSERT INTO bank.accounts VALUES (1, 1000.50);
-~~~
-~~~
-INSERT 1
-~~~
-
-~~~ sql
> SELECT * FROM bank.accounts;
~~~
@@ -114,9 +102,13 @@ INSERT 1
(1 row)
~~~
-When you're done, use **CTRL + D**, **CTRL + C**, or `\q` to exit the SQL shell.
+Exit the SQL shell on node 1:
+
+~~~ sql
+> \q
+~~~
-If you want to verify that the containers/nodes are, in fact, part of a single cluster, you can start the SQL shell in one of the other containers and check for the new `bank` database:
+Then start the SQL shell in the second container:
~~~ shell
$ docker exec -it roach2 ./cockroach sql
@@ -125,25 +117,43 @@ $ docker exec -it roach2 ./cockroach sql
# To exit: CTRL + D.
~~~
+Now run the same `SELECT` query:
+
~~~ sql
-> SHOW DATABASES;
+> SELECT * FROM bank.accounts;
~~~
~~~
-+----------+
-| Database |
-+----------+
-| bank |
-| system |
-+----------+
++----+---------+
+| id | balance |
++----+---------+
+| 1 | 1000.5 |
++----+---------+
+(1 row)
~~~
-## Step 5. Open the Admin UI
+As you can see, node 1 and node 2 behaved identically as SQL gateways.
+
+When you're done, exit the SQL shell on node 2:
+
+~~~ sql
+> \q
+~~~
+
+## Step 5. Monitor the cluster
When you started the first container/node, you mapped the node's default HTTP port `8080` to port `8080` on the host. To check out the [Admin UI](explore-the-admin-ui.html) for your cluster, point your browser to that port on `localhost`, i.e., `http://localhost:8080`.
+As mentioned earlier, CockroachDB automatically replicates your data behind-the-scenes. To verify that data written in the previous step was replicated successfully, scroll down to the **Replicas per Store** graph and hover over the line:
+
+
+
+The replica count on each node is identical, indicating that all data in the cluster was replicated 3 times (the default).
+
+{{site.data.alerts.callout_success}}For more insight into how CockroachDB automatically replicates and rebalances data, and tolerates and recovers from failures, see our replication, rebalancing, fault tolerance demos.{{site.data.alerts.end}}
+
## Step 6. Stop the cluster
Use the `docker stop` and `docker rm` commands to stop and remove the containers (and therefore the cluster):
diff --git a/asciicasts/start-a-local-cluster.json b/asciicasts/start-a-local-cluster.json
index 533886b120a..8ff4aaed346 100644
--- a/asciicasts/start-a-local-cluster.json
+++ b/asciicasts/start-a-local-cluster.json
@@ -1,1506 +1,2318 @@
{
+ "width": 150,
+ "title": null,
+ "version": 1,
+ "env": {
+ "SHELL": "/bin/bash",
+ "TERM": "xterm-256color"
+ },
+ "command": "/bin/bash -l",
+ "duration": 131.531059,
+ "height": 33,
"stdout": [
[
- 0.024787,
+ 0.031906,
"\u001b[?1034h\u001b[32m~\u001b[m$ "
],
[
- 1.883153,
- "# Step"
+ 0.785576,
+ "# Ste"
+ ],
+ [
+ 3.8e-05,
+ "p 1. S"
+ ],
+ [
+ 0.00011,
+ "tart t"
+ ],
+ [
+ 4.5e-05,
+ "he f"
+ ],
+ [
+ 3.9e-05,
+ "irs"
+ ],
+ [
+ 3.6e-05,
+ "t "
+ ],
+ [
+ 4e-05,
+ "n"
+ ],
+ [
+ 3.6e-05,
+ "ode"
+ ],
+ [
+ 4.1e-05,
+ "."
+ ],
+ [
+ 0.521098,
+ "\r\n"
+ ],
+ [
+ 4.9e-05,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 0.439044,
+ "\r\n"
+ ],
+ [
+ 5.7e-05,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 4.074014,
+ "co"
+ ],
+ [
+ 3.8e-05,
+ "ckroach s"
+ ],
+ [
+ 2.1e-05,
+ "tar"
+ ],
+ [
+ 2.1e-05,
+ "t "
+ ],
+ [
+ 2.9e-05,
+ "--b"
+ ],
+ [
+ 2.3e-05,
+ "ac"
+ ],
+ [
+ 1.9e-05,
+ "kg"
+ ],
+ [
+ 1.8e-05,
+ "ro"
+ ],
+ [
+ 1.9e-05,
+ "un"
+ ],
+ [
+ 2e-05,
+ "d"
+ ],
+ [
+ 0.594865,
+ "\r\n"
+ ],
+ [
+ 0.215018,
+ "CockroachDB node starting at 2017-04-07 10:25:15.083933992 -0400 EDT\r\nbuild: CCL 764bcf0 @ 2017/04/05 22:45:58 (go1.8)\r\nadmin: http://localhost:8080\r\nsql: postgresql://root@localhost:26257?sslmode=disable\r\nlogs: cockroach-data/logs\r\nstore[0]: path=cockroach-data\r\nstatus: initialized new cluster\r\nclusterID: 40ecce29-4b97-4e1f-a0e9-4cd2defcfc90\r\nnodeID: 1\r\n"
+ ],
+ [
+ 0.003271,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 0.823407,
+ "\r\n"
+ ],
+ [
+ 8.7e-05,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 4.065808,
+ "# Step 2."
+ ],
+ [
+ 9.3e-05,
+ " Add n"
+ ],
+ [
+ 4.7e-05,
+ "odes "
+ ],
+ [
+ 4.6e-05,
+ "to"
+ ],
+ [
+ 4.6e-05,
+ " th"
+ ],
+ [
+ 3.7e-05,
+ "e "
+ ],
+ [
+ 2.5e-05,
+ "cl"
+ ],
+ [
+ 2.4e-05,
+ "us"
+ ],
+ [
+ 2.4e-05,
+ "te"
+ ],
+ [
+ 2.4e-05,
+ "r."
+ ],
+ [
+ 0.586049,
+ "\r\n"
+ ],
+ [
+ 0.000157,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 0.753481,
+ "\r\n"
+ ],
+ [
+ 8.2e-05,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 3.728016,
+ "#"
+ ],
+ [
+ 6.6e-05,
+ " Add th"
+ ],
+ [
+ 4.5e-05,
+ "e secon"
+ ],
+ [
+ 1.9e-05,
+ "d n"
+ ],
+ [
+ 2.2e-05,
+ "od"
+ ],
+ [
+ 2.4e-05,
+ "e"
+ ],
+ [
+ 1.9e-05,
+ ":"
+ ],
+ [
+ 0.335986,
+ "\r\n"
+ ],
+ [
+ 0.000136,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 3.746133,
+ "co"
+ ],
+ [
+ 5e-05,
+ "ckroac"
+ ],
+ [
+ 3.8e-05,
+ "h st"
+ ],
+ [
+ 3.6e-05,
+ "ar"
+ ],
+ [
+ 3.7e-05,
+ "t -"
+ ],
+ [
+ 3.5e-05,
+ "-b"
+ ],
+ [
+ 3.3e-05,
+ "ac"
+ ],
+ [
+ 3.6e-05,
+ "kg"
+ ],
+ [
+ 5.2e-05,
+ "rou"
+ ],
+ [
+ 4.3e-05,
+ "nd"
+ ],
+ [
+ 2.1e-05,
+ " -"
+ ],
+ [
+ 2.3e-05,
+ "-"
+ ],
+ [
+ 2.2e-05,
+ "st"
+ ],
+ [
+ 1.9e-05,
+ "or"
+ ],
+ [
+ 2.1e-05,
+ "e="
+ ],
+ [
+ 2e-05,
+ "n"
],
[
- 0.000132,
- " 1. Start the c"
+ 2.1e-05,
+ "od"
],
[
2.7e-05,
- "lust"
+ "e"
+ ],
+ [
+ 2.1e-05,
+ "2 "
+ ],
+ [
+ 2e-05,
+ "-"
+ ],
+ [
+ 2e-05,
+ "-p"
+ ],
+ [
+ 2.5e-05,
+ "o"
+ ],
+ [
+ 2.1e-05,
+ "r"
+ ],
+ [
+ 2.1e-05,
+ "t="
+ ],
+ [
+ 2.3e-05,
+ "2"
],
[
2.2e-05,
- "er"
+ "62"
+ ],
+ [
+ 2.5e-05,
+ "5"
+ ],
+ [
+ 2.2e-05,
+ "8"
+ ],
+ [
+ 2.1e-05,
+ " -"
+ ],
+ [
+ 2e-05,
+ "-"
+ ],
+ [
+ 2.1e-05,
+ "h"
+ ],
+ [
+ 2.3e-05,
+ "t"
+ ],
+ [
+ 2.1e-05,
+ "t"
+ ],
+ [
+ 2.3e-05,
+ "p"
+ ],
+ [
+ 2e-05,
+ "-"
+ ],
+ [
+ 2.1e-05,
+ "p"
+ ],
+ [
+ 2e-05,
+ "or"
+ ],
+ [
+ 3.5e-05,
+ "t"
+ ],
+ [
+ 2.3e-05,
+ "="
+ ],
+ [
+ 2.1e-05,
+ "80"
+ ],
+ [
+ 3.8e-05,
+ "8"
+ ],
+ [
+ 3.8e-05,
+ "1"
+ ],
+ [
+ 2e-05,
+ " "
+ ],
+ [
+ 1.8e-05,
+ "-"
+ ],
+ [
+ 1.9e-05,
+ "-"
+ ],
+ [
+ 6.1e-05,
+ "j"
+ ],
+ [
+ 3.9e-05,
+ "oin"
+ ],
+ [
+ 2.8e-05,
+ "="
+ ],
+ [
+ 2.6e-05,
+ "lo"
+ ],
+ [
+ 4.1e-05,
+ "c"
+ ],
+ [
+ 2.5e-05,
+ "al"
+ ],
+ [
+ 3.3e-05,
+ "h"
+ ],
+ [
+ 2.4e-05,
+ "o"
+ ],
+ [
+ 2.3e-05,
+ "s"
+ ],
+ [
+ 2.3e-05,
+ "t"
+ ],
+ [
+ 2.2e-05,
+ ":"
+ ],
+ [
+ 2e-05,
+ "2"
+ ],
+ [
+ 2.2e-05,
+ "6"
+ ],
+ [
+ 3.4e-05,
+ "2"
+ ],
+ [
+ 2.3e-05,
+ "5"
+ ],
+ [
+ 2.5e-05,
+ "7"
+ ],
+ [
+ 0.468933,
+ "\r\n"
+ ],
+ [
+ 0.183436,
+ "CockroachDB node starting at 2017-04-07 10:25:29.78071084 -0400 EDT\r\nbuild: CCL 764bcf0 @ 2017/04/05 22:45:58 (go1.8)\r\nadmin: http://localhost:8081\r\nsql: postgresql://root@localhost:26258?sslmode=disable\r\nlogs: node2/logs\r\nstore[0]: path=node2\r\nstatus: initialized new node, joined pre-existing cluster\r\nclusterID: 40ecce29-4b97-4e1f-a0e9-4cd2defcfc90\r\nnodeID: 2\r\n"
+ ],
+ [
+ 0.004651,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 0.917671,
+ "\r\n"
+ ],
+ [
+ 0.000111,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 7.3286,
+ "# Add t"
+ ],
+ [
+ 9.3e-05,
+ "he third"
+ ],
+ [
+ 6e-05,
+ " no"
+ ],
+ [
+ 2.9e-05,
+ "de:"
+ ],
+ [
+ 0.359346,
+ "\r\n"
+ ],
+ [
+ 0.000151,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 3.781407,
+ "cockr"
+ ],
+ [
+ 5.4e-05,
+ "oach s"
+ ],
+ [
+ 3.6e-05,
+ "tar"
+ ],
+ [
+ 3.9e-05,
+ "t -"
+ ],
+ [
+ 5.3e-05,
+ "-ba"
+ ],
+ [
+ 3.7e-05,
+ "ckg"
+ ],
+ [
+ 2.1e-05,
+ "ro"
+ ],
+ [
+ 2.1e-05,
+ "u"
+ ],
+ [
+ 2e-05,
+ "nd"
+ ],
+ [
+ 2.2e-05,
+ " -"
+ ],
+ [
+ 2.1e-05,
+ "-s"
+ ],
+ [
+ 2e-05,
+ "to"
+ ],
+ [
+ 2.2e-05,
+ "r"
+ ],
+ [
+ 2e-05,
+ "e="
+ ],
+ [
+ 2.3e-05,
+ "no"
+ ],
+ [
+ 2.1e-05,
+ "d"
+ ],
+ [
+ 2.4e-05,
+ "e"
+ ],
+ [
+ 2.4e-05,
+ "3 "
+ ],
+ [
+ 2.4e-05,
+ "--"
+ ],
+ [
+ 2.3e-05,
+ "p"
+ ],
+ [
+ 2.2e-05,
+ "or"
+ ],
+ [
+ 2.4e-05,
+ "t"
+ ],
+ [
+ 2.2e-05,
+ "=2"
+ ],
+ [
+ 2.3e-05,
+ "6"
+ ],
+ [
+ 2.2e-05,
+ "25"
+ ],
+ [
+ 2.3e-05,
+ "9"
+ ],
+ [
+ 2.2e-05,
+ " -"
+ ],
+ [
+ 2.5e-05,
+ "-"
+ ],
+ [
+ 2.1e-05,
+ "h"
+ ],
+ [
+ 2.2e-05,
+ "t"
+ ],
+ [
+ 2.2e-05,
+ "tp"
+ ],
+ [
+ 2.3e-05,
+ "-"
+ ],
+ [
+ 2.1e-05,
+ "p"
+ ],
+ [
+ 2.3e-05,
+ "o"
+ ],
+ [
+ 2.3e-05,
+ "rt"
+ ],
+ [
+ 2.2e-05,
+ "="
+ ],
+ [
+ 2.1e-05,
+ "8"
+ ],
+ [
+ 2.3e-05,
+ "0"
+ ],
+ [
+ 2.1e-05,
+ "8"
+ ],
+ [
+ 2.2e-05,
+ "2"
+ ],
+ [
+ 2.2e-05,
+ " -"
+ ],
+ [
+ 6.8e-05,
+ "-"
+ ],
+ [
+ 3.1e-05,
+ "joi"
+ ],
+ [
+ 4.2e-05,
+ "n"
+ ],
+ [
+ 2e-05,
+ "="
+ ],
+ [
+ 2e-05,
+ "l"
+ ],
+ [
+ 2e-05,
+ "o"
+ ],
+ [
+ 1.9e-05,
+ "c"
+ ],
+ [
+ 2e-05,
+ "a"
+ ],
+ [
+ 3.4e-05,
+ "l"
+ ],
+ [
+ 2.3e-05,
+ "h"
+ ],
+ [
+ 2e-05,
+ "o"
+ ],
+ [
+ 1.9e-05,
+ "s"
+ ],
+ [
+ 3.3e-05,
+ "t"
+ ],
+ [
+ 2.2e-05,
+ ":"
+ ],
+ [
+ 1.9e-05,
+ "2"
+ ],
+ [
+ 2e-05,
+ "6"
+ ],
+ [
+ 3.4e-05,
+ "2"
+ ],
+ [
+ 1.9e-05,
+ "5"
+ ],
+ [
+ 2.1e-05,
+ "7"
+ ],
+ [
+ 0.366846,
+ "\r\n"
+ ],
+ [
+ 0.197092,
+ "CockroachDB node starting at 2017-04-07 10:25:42.738590077 -0400 EDT\r\nbuild: CCL 764bcf0 @ 2017/04/05 22:45:58 (go1.8)\r\nadmin: http://localhost:8082\r\nsql: postgresql://root@localhost:26259?sslmode=disable\r\nlogs: node3/logs\r\nstore[0]: path=node3\r\nstatus: initialized new node, joined pre-existing cluster\r\nclusterID: 40ecce29-4b97-4e1f-a0e9-4cd2defcfc90\r\nnodeID: 3\r\n"
+ ],
+ [
+ 0.005503,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 0.717864,
+ "\r\n"
+ ],
+ [
+ 0.000126,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 3.741663,
+ "# "
+ ],
+ [
+ 3.9e-05,
+ "Step 3. "
+ ],
+ [
+ 7.9e-05,
+ "Tes"
+ ],
+ [
+ 2.6e-05,
+ "t th"
+ ],
+ [
+ 2e-05,
+ "e "
+ ],
+ [
+ 2.2e-05,
+ "c"
+ ],
+ [
+ 4.6e-05,
+ "lu"
+ ],
+ [
+ 1.9e-05,
+ "st"
+ ],
+ [
+ 1.8e-05,
+ "er"
+ ],
+ [
+ 1.9e-05,
+ "."
+ ],
+ [
+ 0.304254,
+ "\r\n"
+ ],
+ [
+ 0.000336,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 0.546516,
+ "\r\n"
+ ],
+ [
+ 0.000147,
+ "\u001b[32m~\u001b[m$ "
+ ],
+ [
+ 3.823473,
+ "# Start the built"
+ ],
+ [
+ 3.2e-05,
+ "-in SQ"
+ ],
+ [
+ 1.9e-05,
+ "L "
+ ],
+ [
+ 1.8e-05,
+ "c"
+ ],
+ [
+ 2.4e-05,
+ "li"
+ ],
+ [
+ 1.8e-05,
+ "en"
+ ],
+ [
+ 1.8e-05,
+ "t"
],
[
- 2.8e-05,
- "."
+ 1.7e-05,
+ " o"
],
[
- 0.714353,
- "\r\n"
+ 1.8e-05,
+ "n"
],
[
- 0.000183,
- "\u001b[32m~\u001b[m$ "
+ 1.7e-05,
+ " "
],
[
- 4.460087,
- "cockro"
+ 1.8e-05,
+ "no"
],
[
- 7.2e-05,
- "ach start"
+ 0.000154,
+ "de 1 and "
],
[
- 4e-05,
- " --b"
+ 2.8e-05,
+ "ex"
],
[
- 3.8e-05,
- "ac"
+ 2e-05,
+ "ec"
],
[
- 4.3e-05,
- "kg"
+ 1.8e-05,
+ "u"
],
[
- 4.1e-05,
- "rou"
+ 1.8e-05,
+ "t"
],
[
- 4.5e-05,
- "nd"
+ 2.1e-05,
+ "e"
],
[
- 2.026725,
- "\r\n"
+ 1.8e-05,
+ " "
],
[
- 0.184367,
- "CockroachDB node starting at 2016-11-14 21:49:07.171698528 -0500 EST\r\nbuild: beta-20161110-125-ge17cad3 @ 2016/11/14 14:57:57 (go1.7.1)\r\nadmin: http://localhost:8080\r\nsql: postgresql://root@localhost:26257?sslmode=disable\r\nlogs: cockroach-data/logs\r\nstore[0]: path=cockroach-data\r\nstatus: initialized new cluster\r\nclusterID: de9725b3-c218-44fc-9b4e-6f93578512c7\r\nnodeID: 1\r\n"
+ 2.2e-05,
+ "st"
],
[
- 0.003473,
- "\u001b[32m~\u001b[m$ "
+ 2.1e-05,
+ "a"
],
[
- 4.198054,
- "\r\n"
+ 1.8e-05,
+ "t"
],
[
- 0.00011,
- "\u001b[32m~\u001b[m$ "
+ 1.7e-05,
+ "e"
],
[
- 4.09415,
- "#"
+ 2.2e-05,
+ "m"
],
[
- 5.2e-05,
- " Step "
+ 1.9e-05,
+ "e"
],
[
- 4e-05,
- "2. Ad"
+ 1.8e-05,
+ "n"
],
[
- 5.3e-05,
- "d "
+ 2.2e-05,
+ "t"
],
[
- 4e-05,
- "a se"
+ 2.3e-05,
+ "s:"
],
[
- 3.3e-05,
- "co"
+ 0.327947,
+ "\r\n"
],
[
- 4.5e-05,
- "nd"
+ 0.000148,
+ "\u001b[32m~\u001b[m$ "
],
[
- 2.1e-05,
- " n"
+ 4.7393,
+ "co"
],
[
- 2e-05,
- "od"
+ 6.8e-05,
+ "ckroach"
],
[
- 2.2e-05,
- "e."
+ 5.9e-05,
+ " sql"
],
[
- 1.497071,
+ 0.394344,
"\r\n"
],
[
- 0.000268,
- "\u001b[32m~\u001b[m$ "
+ 0.040675,
+ "# Welcome to the cockroach SQL interface.\r\n# All statements must be terminated by a semicolon.\r\n# To exit: CTRL + D.\r\n"
],
[
- 6.282016,
- "cock"
+ 0.000901,
+ "\u001b[J\u001b[2K\rroot@:26257/> \b"
],
[
- 6e-05,
- "roach s"
+ 4.979473,
+ "\u001b[J\u001b[2K\rroot@:26257/> C"
],
[
- 3.4e-05,
- "t"
+ 6.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CR\u001b[J\u001b[2K\rroot@:26257/> CRE\u001b[J\u001b[2K\rroot@:26257/> CREA\u001b[J\u001b[2K\r"
],
[
- 2.8e-05,
- "art"
+ 5.4e-05,
+ "root@:26257/> CREAT\u001b[J\u001b[2K\rroot@:26257/> CREATE\u001b[J\u001b[2K\r"
],
[
- 3e-05,
- " --b"
+ 8.4e-05,
+ "root@:26257/> CREATE \u001b[J\u001b[2K\rroot@:26257/> CREATE D\u001b[J\u001b[2K\r"
],
[
- 0.000149,
- "ackground -"
+ 6.6e-05,
+ "root@:26257/> CREATE DA\u001b[J\u001b[2K\rroot@:26257/> CREATE DAT\u001b[J\u001b[2K\rroot@:26257/> CREATE DATA\u001b[J\u001b[2K\r"
],
[
3.7e-05,
- "-store"
- ],
- [
- 2.5e-05,
- "=n"
+ "root@:26257/> CREATE DATAB\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABA"
],
[
- 2.4e-05,
- "od"
+ 5e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABAS"
],
[
- 2.4e-05,
- "e2"
+ 9e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABASE\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABASE "
],
[
- 2.7e-05,
- " -"
+ 5.5e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABASE b\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABASE ba"
],
[
- 2.1e-05,
- "-p"
+ 4.3e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABASE ban\u001b[J\u001b[2K\r"
],
[
- 2.2e-05,
- "or"
+ 4e-05,
+ "root@:26257/> CREATE DATABASE bank\u001b[J\u001b[2K\r"
],
[
- 1.9e-05,
- "t="
+ 4e-05,
+ "root@:26257/> CREATE DATABASE bank;"
],
[
- 6e-05,
- "2"
+ 0.354285,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABASE bank;\u001b[J\u001b[2K\rroot@:26257/> CREATE DATABASE bank;\r\n"
],
[
- 3.4e-05,
- "6258 "
+ 0.008047,
+ "CREATE DATABASE\r\n"
],
[
- 2.2e-05,
- "--"
+ 0.000709,
+ "\u001b[J\u001b[2K\rroot@:26257/> \b"
],
[
- 2e-05,
- "ht"
+ 5.14688,
+ "\u001b[J\u001b[2K\rroot@:26257/> C"
],
[
- 3.4e-05,
- "t"
+ 6.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CR\u001b[J\u001b[2K\rroot@:26257/> CRE\u001b[J\u001b[2K\rroot@:26257/> CREA"
],
[
2.2e-05,
- "p-"
+ "\u001b[J\u001b[2K\rroot@:26257/> CREAT"
],
[
- 6.4e-05,
- "p"
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE\u001b[J\u001b[2K\rroot@:26257/> CREATE "
],
[
- 2.7e-05,
- "ort=8"
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE T\u001b[J\u001b[2K\r"
],
[
- 2.4e-05,
- "0"
+ 2.1e-05,
+ "root@:26257/> CREATE TA\u001b[J\u001b[2K\rroot@:26257/> CREATE TAB"
],
[
2e-05,
- "8"
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABL"
],
[
- 2.1e-05,
- "1 "
+ 2e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 0.000109,
- "--j"
+ 2.1e-05,
+ "root@:26257/> CREATE TABLE\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE "
],
[
- 3.2e-05,
- "oin="
+ 6.7e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE b\u001b[J\u001b[2K\r"
],
[
- 2.7e-05,
- "lo"
+ 2.4e-05,
+ "root@:26257/> CREATE TABLE ba\u001b[J\u001b[2K\r"
],
[
- 2.4e-05,
- "ca"
+ 1.9e-05,
+ "root@:26257/> CREATE TABLE ban"
],
[
- 5.3e-05,
- "lh"
+ 4.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank"
],
[
- 2.7e-05,
- "os"
+ 2.9e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.\u001b[J\u001b[2K\r"
],
[
- 6e-05,
- "t:"
+ 2e-05,
+ "root@:26257/> CREATE TABLE bank.a\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.ac"
],
[
- 2.8e-05,
- "26"
+ 6.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.acc"
],
[
- 2e-05,
- "2"
+ 4.2e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.acco\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accou"
],
[
- 2.5e-05,
- "5"
+ 3e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accoun\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.account"
],
[
- 1.8e-05,
- "7"
+ 2.7e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts"
],
[
- 1.974285,
- "\r\n"
+ 2.5e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts "
],
[
- 0.183343,
- "CockroachDB node starting at 2016-11-14 21:49:25.405496704 -0500 EST\r\nbuild: beta-20161110-125-ge17cad3 @ 2016/11/14 14:57:57 (go1.7.1)\r\nadmin: http://localhost:8081\r\nsql: postgresql://root@localhost:26258?sslmode=disable\r\nlogs: node2/logs\r\nstore[0]: path=node2\r\nstatus: initialized new node, joined pre-existing cluster\r\nclusterID: de9725b3-c218-44fc-9b4e-6f93578512c7\r\nnodeID: 2\r\n"
+ 7e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts ("
],
[
- 0.002094,
- "\u001b[32m~\u001b[m$ "
+ 2.9e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (i"
],
[
- 4.235433,
- "\r\n"
+ 2.4e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id"
],
[
- 3.5e-05,
- "\u001b[32m~\u001b[m$ "
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id "
],
[
- 3.963075,
- "# S"
+ 2.4e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 4.7e-05,
- "tep 3. "
+ 2.2e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id I\u001b[J\u001b[2K\r"
],
[
- 3.2e-05,
- "Ad"
+ 2.5e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id IN"
],
[
2.3e-05,
- "d a "
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT"
],
[
- 2.7e-05,
- "thi"
+ 2.2e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT "
],
[
- 2.1e-05,
- "rd "
+ 2e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 4.8e-05,
- "no"
+ 2.4e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT P\u001b[J\u001b[2K\r"
],
[
- 3.2e-05,
- "de."
+ 2e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PR"
],
[
- 1.487618,
- "\r\n"
+ 1.9e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRI"
],
[
- 6.4e-05,
- "\u001b[32m~\u001b[m$ "
+ 3e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 4.392267,
- "c"
+ 2.2e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIM"
],
[
- 8.3e-05,
- "ockroach sta"
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMA"
],
[
4.4e-05,
- "rt -"
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMAR"
],
[
- 5.2e-05,
- "-b"
+ 3e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY"
],
[
2.4e-05,
- "ack"
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY "
+ ],
+ [
+ 2.1e-05,
+ "\u001b[J\u001b[2K\r"
+ ],
+ [
+ 2.1e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY K\u001b[J\u001b[2K\r"
],
[
2.3e-05,
- "gr"
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KE"
],
[
- 2.4e-05,
- "ou"
+ 2.2e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY"
],
[
- 2.4e-05,
- "nd"
+ 5.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY,"
],
[
- 2e-05,
- " -"
+ 2.2e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 2.4e-05,
- "-s"
+ 2.1e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, "
],
[
2e-05,
- "t"
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, b"
],
[
- 2.3e-05,
- "or"
+ 4.7e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, ba"
],
[
2.1e-05,
- "e="
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, bal"
],
[
- 2.6e-05,
- "n"
+ 3.8e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 2.2e-05,
- "od"
+ 2.3e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, bala\u001b[J\u001b[2K\r"
],
[
- 2.1e-05,
- "e3"
+ 2.2e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balan"
],
[
- 2e-05,
- " "
+ 4.8e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balanc"
],
[
- 2e-05,
- "-"
+ 2.8e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance"
],
[
- 2.1e-05,
- "-p"
+ 2.2e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 2.9e-05,
- "o"
+ 2.2e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance "
],
[
2.1e-05,
- "rt"
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance D"
],
[
- 2.4e-05,
- "="
+ 4.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DE"
],
[
- 2.1e-05,
- "26"
+ 2.3e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 2.1e-05,
- "2"
+ 2e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DEC"
],
[
- 2.2e-05,
- "5"
+ 5.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECI"
],
[
- 2.1e-05,
- "9 "
+ 2.3e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIM"
],
[
- 5.3e-05,
- "--"
+ 6.8e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 3.7e-05,
- "htt"
+ 3.2e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMA\u001b[J\u001b[2K\r"
],
[
2.1e-05,
- "p"
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL"
],
[
- 1.9e-05,
- "-"
+ 2e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 1.8e-05,
- "p"
+ 2.7e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL)"
],
[
1.9e-05,
- "o"
+ "\u001b[J\u001b[2K\r"
],
[
- 1.9e-05,
- "r"
+ 2.5e-05,
+ "root@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);"
+ ],
+ [
+ 0.629195,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);"
],
[
- 1.8e-05,
- "t"
+ 5.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);\r\n"
],
[
- 2.6e-05,
- "="
+ 0.009248,
+ "CREATE TABLE\r\n"
],
[
- 1.9e-05,
- "8"
+ 0.000843,
+ "\u001b[J\u001b[2K\rroot@:26257/> \b"
],
[
- 1.8e-05,
- "0"
+ 4.573451,
+ "\u001b[J\u001b[2K\rroot@:26257/> I"
],
[
- 1.9e-05,
- "8"
+ 0.000112,
+ "\u001b[J\u001b[2K\rroot@:26257/> IN\u001b[J\u001b[2K\rroot@:26257/> INS\u001b[J\u001b[2K\r"
],
[
- 1.8e-05,
- "2"
+ 5.7e-05,
+ "root@:26257/> INSE\u001b[J\u001b[2K\rroot@:26257/> INSER\u001b[J\u001b[2K\rroot@:26257/> INSERT\u001b[J\u001b[2K\rroot@:26257/> INSERT "
],
[
- 2.1e-05,
- " "
+ 2.4e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT I\u001b[J\u001b[2K\r"
],
[
- 1.9e-05,
- "-"
+ 2.1e-05,
+ "root@:26257/> INSERT IN\u001b[J\u001b[2K\r"
],
[
- 1.9e-05,
- "-"
+ 2.4e-05,
+ "root@:26257/> INSERT INT"
],
[
2.1e-05,
- "j"
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO"
],
[
- 2e-05,
- "o"
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO \u001b[J\u001b[2K\r"
],
[
- 2.5e-05,
- "i"
+ 2.6e-05,
+ "root@:26257/> INSERT INTO b\u001b[J\u001b[2K\r"
],
[
- 1.8e-05,
- "n"
+ 2.1e-05,
+ "root@:26257/> INSERT INTO ba\u001b[J\u001b[2K\r"
],
[
- 2.6e-05,
- "=l"
+ 2e-05,
+ "root@:26257/> INSERT INTO ban\u001b[J\u001b[2K\r"
],
[
- 3.3e-05,
- "o"
+ 2e-05,
+ "root@:26257/> INSERT INTO bank\u001b[J\u001b[2K\r"
],
[
1.9e-05,
- "c"
+ "root@:26257/> INSERT INTO bank."
],
[
- 2.2e-05,
- "a"
+ 2e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.a"
],
[
- 2.2e-05,
- "l"
+ 0.000918,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.ac\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.acc\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.acco\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accou\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accoun\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.account\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts \u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts V\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VA\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VAL\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALU\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUE\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES \u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES ("
],
[
- 2.2e-05,
- "h"
+ 3.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1"
],
[
- 2.8e-05,
- "o"
+ 9.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1,"
],
[
- 1.9e-05,
- "s"
+ 2.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, "
],
[
- 2.4e-05,
- "t"
+ 2e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 2.3e-05,
- ":"
+ 1.8e-05,
+ "root@:26257/> INSERT INTO bank.accounts VALUES (1, 1"
],
[
- 2.3e-05,
- "2"
+ 2e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, 10"
],
[
- 2.9e-05,
- "6"
+ 2.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, 100"
],
[
- 1.8e-05,
- "2"
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, 1000"
],
[
- 3.6e-05,
- "5"
+ 1.8e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 2e-05,
- "7"
+ 1.7e-05,
+ "root@:26257/> INSERT INTO bank.accounts VALUES (1, 1000."
],
[
- 2.413921,
- "\r\n"
+ 2.3e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, 1000.5"
],
[
- 0.181175,
- "CockroachDB node starting at 2016-11-14 21:49:42.084388003 -0500 EST\r\nbuild: beta-20161110-125-ge17cad3 @ 2016/11/14 14:57:57 (go1.7.1)\r\nadmin: http://localhost:8082\r\nsql: postgresql://root@localhost:26259?sslmode=disable\r\nlogs: node3/logs\r\nstore[0]: path=node3\r\nstatus: initialized new node, joined pre-existing cluster\r\nclusterID:"
+ 1.9e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, 1000.50"
],
[
- 0.000138,
- " de9725b3-c218-44fc-9b4e-6f93578512c7\r\nnodeID: 3\r\n"
+ 3.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, 1000.50)"
],
[
- 0.004389,
- "\u001b[32m~\u001b[m$ "
+ 2e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 4.466503,
- "\r\n\u001b[32m~\u001b[m$ "
+ 2.2e-05,
+ "root@:26257/> INSERT INTO bank.accounts VALUES (1, 1000.50);"
],
[
- 4.402927,
- "# S"
+ 1.009706,
+ "\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, 1000.50);\u001b[J\u001b[2K\rroot@:26257/> INSERT INTO bank.accounts VALUES (1, 1000.50);\r\n"
],
[
- 4.3e-05,
- "tep 4. Use"
+ 0.010116,
+ "INSERT 1\r\n"
],
[
- 0.000115,
- " the"
+ 0.000376,
+ "\u001b[J\u001b[2K\rroot@:26257/> \b"
],
[
- 6e-05,
- " built-i"
+ 4.489963,
+ "\u001b[J\u001b[2K\rroot@:26257/> S\u001b[J\u001b[2K\r"
],
[
- 2.9e-05,
- "n SQL"
+ 5.4e-05,
+ "root@:26257/> SE\u001b[J\u001b[2K\rroot@:26257/> SEL\u001b[J\u001b[2K\r"
],
[
- 5.3e-05,
- " clien"
+ 3.8e-05,
+ "root@:26257/> SELE\u001b[J\u001b[2K\rroot@:26257/> SELEC"
],
[
- 2.2e-05,
- "t "
+ 3.4e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT\u001b[J\u001b[2K\r"
],
[
- 2.3e-05,
- "to"
+ 4e-05,
+ "root@:26257/> SELECT \u001b[J\u001b[2K\rroot@:26257/> SELECT *"
],
[
- 1.9e-05,
- " e"
+ 4.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * \u001b[J\u001b[2K\r"
],
[
- 1.7e-05,
- "xe"
+ 2.5e-05,
+ "root@:26257/> SELECT * F\u001b[J\u001b[2K\rroot@:26257/> SELECT * FR"
],
[
- 1.9e-05,
- "c"
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FRO\u001b[J\u001b[2K\r"
],
[
- 1.8e-05,
- "ut"
+ 2.2e-05,
+ "root@:26257/> SELECT * FROM\u001b[J\u001b[2K\r"
],
[
- 1.8e-05,
- "e"
+ 2.1e-05,
+ "root@:26257/> SELECT * FROM \u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM b"
],
[
- 0.000156,
- " statemen"
+ 2.2e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM ba"
],
[
- 2.7e-05,
- "ts"
+ 2.4e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM ban\u001b[J\u001b[2K\r"
],
[
- 1.9e-05,
- "."
+ 2.2e-05,
+ "root@:26257/> SELECT * FROM bank"
],
[
- 1.525968,
- "\r\n"
+ 2.2e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM bank.\u001b[J\u001b[2K\r"
],
[
- 0.000222,
- "\u001b[32m~\u001b[m$ "
+ 2.3e-05,
+ "root@:26257/> SELECT * FROM bank.a\u001b[J\u001b[2K\r"
],
[
- 3.948275,
- "cockroac"
+ 2.2e-05,
+ "root@:26257/> SELECT * FROM bank.ac\u001b[J\u001b[2K\r"
],
[
- 9.7e-05,
- "h sql"
+ 2.2e-05,
+ "root@:26257/> SELECT * FROM bank.acc\u001b[J\u001b[2K\r"
],
[
- 1.768259,
- "\r\n"
+ 2.1e-05,
+ "root@:26257/> SELECT * FROM bank.acco\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM bank.accou"
],
[
- 0.033891,
- "# Welcome to the cockroach SQL interface.\r\n# All statements must be terminated by a semicolon.\r\n# To exit: CTRL + D.\r\n"
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM bank.accoun"
],
[
- 0.000655,
- "\u001b[J\u001b[2K\rroot@:26257> \b"
+ 2.4e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM bank.account"
],
[
- 5.028156,
- "\u001b[J\u001b[2K\rroot@:26257> C"
+ 2.3e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM bank.accounts"
],
[
- 6.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CR\u001b[J\u001b[2K\rroot@:26257> CRE\u001b[J\u001b[2K\rroot@:26257> CREA\u001b[J\u001b[2K\rroot@:26257> CREAT"
+ 2.4e-05,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM bank.accounts;"
],
[
- 3.7e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE\u001b[J\u001b[2K\rroot@:26257> CREATE \u001b[J\u001b[2K\rroot@:26257> CREATE D\u001b[J\u001b[2K\rroot@:26257> CREATE DA\u001b[J\u001b[2K\rroot@:26257> CREATE DAT"
+ 0.735829,
+ "\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM bank.accounts;\u001b[J\u001b[2K\rroot@:26257/> SELECT * FROM bank.accounts;\r\n"
],
[
- 6.2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE DATA\u001b[J\u001b[2K\rroot@:26257> CREATE DATAB"
+ 0.004463,
+ "+----+---------+\r\n| id | balance |\r\n+----+---------+\r\n| "
],
[
- 3.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE DATABA\u001b[J\u001b[2K\rroot@:26257> CREATE DATABAS\u001b[J\u001b[2K\rroot@:26257> CREATE DATABASE\u001b[J\u001b[2K\r"
+ 4.8e-05,
+ " 1 | 1000.50 |\r\n+----+---------+\r\n(1 row)\r\n"
],
[
- 2.4e-05,
- "root@:26257> CREATE DATABASE \u001b[J\u001b[2K\r"
+ 0.000695,
+ "\u001b[J\u001b[2K\rroot@:26257/> \b"
],
[
- 2.2e-05,
- "root@:26257> CREATE DATABASE b\u001b[J\u001b[2K\r"
+ 1.858893,
+ "\u001b[J\u001b[2K\rroot@:26257/> \\"
],
[
- 2.3e-05,
- "root@:26257> CREATE DATABASE ba\u001b[J\u001b[2K\rroot@:26257> CREATE DATABASE ban"
+ 0.07569,
+ "\u001b[J\u001b[2K\rroot@:26257/> \\q"
],
[
- 2.2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE DATABASE bank"
+ 0.151674,
+ "\u001b[J\u001b[2K\rroot@:26257/> \\q\u001b[J\u001b[2K\rroot@:26257/> \\q\r\n"
],
[
- 3.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE DATABASE bank;"
+ 5.6e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 1.772826,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE DATABASE bank;"
+ 0.00325,
+ "\u001b[32m~\u001b[m$ "
],
[
- 5.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE DATABASE bank;\r\n"
+ 1.127797,
+ "\r\n"
],
[
- 0.010851,
- "CREATE DATABASE\r\n\u001b[J\u001b[2K\rroot@:26257> \b"
+ 9.7e-05,
+ "\u001b[32m~\u001b[m$ "
],
[
- 5.13035,
- "\u001b[J\u001b[2K\rroot@:26257> C"
+ 5.24383,
+ "# S"
],
[
- 4.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CR\u001b[J\u001b[2K\rroot@:26257> CRE\u001b[J\u001b[2K\rroot@:26257> CREA"
+ 6.1e-05,
+ "tart th"
],
[
- 5.8e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREAT\u001b[J\u001b[2K\rroot@:26257> CREATE\u001b[J\u001b[2K\r"
+ 3.4e-05,
+ "e b"
],
[
- 3.2e-05,
- "root@:26257> CREATE \u001b[J\u001b[2K\rroot@:26257> CREATE T\u001b[J\u001b[2K\rroot@:26257> CREATE TA\u001b[J\u001b[2K\rroot@:26257> CREATE TAB\u001b[J\u001b[2K\rroot@:26257> CREATE TABL"
+ 3.1e-05,
+ "ui"
],
[
- 1.8e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE\u001b[J\u001b[2K\r"
+ 4.6e-05,
+ "lt-"
],
[
- 2.1e-05,
- "root@:26257> CREATE TABLE \u001b[J\u001b[2K\r"
+ 3.4e-05,
+ "in"
],
[
2e-05,
- "root@:26257> CREATE TABLE b\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE ba"
+ " S"
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE ban"
+ 1.8e-05,
+ "QL"
],
[
- 1.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank\u001b[J\u001b[2K\r"
+ 1.7e-05,
+ " "
],
[
- 2e-05,
- "root@:26257> CREATE TABLE bank.\u001b[J\u001b[2K\r"
+ 1.8e-05,
+ "cl"
],
[
- 2.1e-05,
- "root@:26257> CREATE TABLE bank.a\u001b[J\u001b[2K\r"
+ 1.7e-05,
+ "i"
],
[
- 2.3e-05,
- "root@:26257> CREATE TABLE bank.ac\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.acc"
+ 1.7e-05,
+ "en"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.acco"
+ 1.8e-05,
+ "t"
],
[
- 2.2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accou"
+ 1.8e-05,
+ " o"
],
[
- 2.2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accoun"
+ 2.7e-05,
+ "n "
],
[
- 2.4e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.account"
+ 1.8e-05,
+ "n"
],
[
- 2.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts\u001b[J\u001b[2K\r"
+ 1.8e-05,
+ "od"
],
[
- 2.5e-05,
- "root@:26257> CREATE TABLE bank.accounts \u001b[J\u001b[2K\r"
+ 1.8e-05,
+ "e"
],
[
- 3e-05,
- "root@:26257> CREATE TABLE bank.accounts (\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (i"
+ 1.8e-05,
+ " "
],
[
- 2.7e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id"
+ 1.8e-05,
+ "2"
],
[
- 2.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id \u001b[J\u001b[2K\r"
+ 1.7e-05,
+ " a"
],
[
- 2.1e-05,
- "root@:26257> CREATE TABLE bank.accounts (id I\u001b[J\u001b[2K\r"
+ 1.8e-05,
+ "n"
],
[
2e-05,
- "root@:26257> CREATE TABLE bank.accounts (id IN"
+ "d"
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT"
+ 1.7e-05,
+ " "
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT "
+ 2.2e-05,
+ "ru"
],
[
- 0.0001,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT P"
+ 1.8e-05,
+ "n"
],
[
- 3.3e-05,
- "\u001b[J\u001b[2K\r"
+ 1.7e-05,
+ " "
],
[
- 2.5e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PR\u001b[J\u001b[2K\r"
+ 1.7e-05,
+ "t"
],
[
- 2.3e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRI\u001b[J\u001b[2K\r"
+ 1.7e-05,
+ "h"
],
[
- 2.2e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIM\u001b[J\u001b[2K\r"
+ 1.7e-05,
+ "e"
],
[
- 2.2e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMA\u001b[J\u001b[2K\r"
+ 1.9e-05,
+ " "
],
[
- 2.2e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMAR\u001b[J\u001b[2K\r"
+ 1.9e-05,
+ "s"
],
[
- 2.1e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY\u001b[J\u001b[2K\r"
+ 1.7e-05,
+ "a"
],
[
- 2.6e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY \u001b[J\u001b[2K\r"
+ 1.8e-05,
+ "m"
],
[
- 2.5e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY K\u001b[J\u001b[2K\r"
+ 1.8e-05,
+ "e"
],
[
- 2.2e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KE\u001b[J\u001b[2K\r"
+ 1.8e-05,
+ " "
],
[
- 6.8e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY,"
+ 1.7e-05,
+ "S"
],
[
- 3.2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, \u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, b"
+ 1.8e-05,
+ "E"
],
[
- 2.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, ba"
+ 1.7e-05,
+ "L"
],
[
- 0.000137,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, bal\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, bala\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balan"
+ 1.9e-05,
+ "E"
],
[
- 2.8e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balanc\u001b[J\u001b[2K\r"
+ 2.1e-05,
+ "C"
],
[
2.1e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance"
+ "T "
],
[
- 0.000124,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance \u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance D\u001b[J\u001b[2K\r"
+ 5.7e-05,
+ "qu"
],
[
- 4.1e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DE\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DEC\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECI"
+ 3.2e-05,
+ "er"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\r"
+ 2.3e-05,
+ "y"
],
[
- 2.4e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIM"
+ 2.1e-05,
+ ":"
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMA"
+ 0.554314,
+ "\r\n"
],
[
- 2.2e-05,
- "\u001b[J\u001b[2K\r"
+ 0.000144,
+ "\u001b[32m~\u001b[m$ "
],
[
- 7.4e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL\u001b[J\u001b[2K\r"
+ 7.410766,
+ "c"
],
[
- 3.6e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL)\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);"
+ 0.106649,
+ "o"
],
[
- 1.843984,
- "\u001b[J\u001b[2K\r"
+ 0.144977,
+ "c"
],
[
- 5.2e-05,
- "root@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);\u001b[J\u001b[2K\rroot@:26257> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);\r\n"
+ 0.181142,
+ "k"
],
[
- 0.008513,
- "CREATE TABLE\r\n\u001b[J\u001b[2K\rroot@:26257> \b"
+ 0.121797,
+ "r"
],
[
- 5.103901,
- "\u001b[J\u001b[2K\rroot@:26257> I"
+ 0.155145,
+ "o"
],
[
- 7.8e-05,
- "\u001b[J\u001b[2K\rroot@:26257> IN\u001b[J\u001b[2K\rroot@:26257> INS\u001b[J\u001b[2K\rroot@:26257> INSE\u001b[J\u001b[2K\rroot@:26257> INSER"
+ 0.189873,
+ "a"
],
[
- 2.5e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT\u001b[J\u001b[2K\r"
+ 0.120968,
+ "c"
],
[
- 2.6e-05,
- "root@:26257> INSERT \u001b[J\u001b[2K\r"
+ 0.100108,
+ "h"
],
[
- 2.1e-05,
- "root@:26257> INSERT I\u001b[J\u001b[2K\rroot@:26257> INSERT IN"
+ 0.08695,
+ " "
],
[
- 2.2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INT"
+ 0.155972,
+ "s"
],
[
- 2.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO\u001b[J\u001b[2K\r"
+ 0.167051,
+ "q"
],
[
- 1.9e-05,
- "root@:26257> INSERT INTO \u001b[J\u001b[2K\r"
+ 0.106979,
+ "l"
],
[
- 2.4e-05,
- "root@:26257> INSERT INTO b\u001b[J\u001b[2K\r"
+ 0.083001,
+ " "
],
[
- 2.2e-05,
- "root@:26257> INSERT INTO ba\u001b[J\u001b[2K\rroot@:26257> INSERT INTO ban"
+ 0.870011,
+ "-"
],
[
- 1.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank"
+ 0.131947,
+ "-"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank."
+ 0.626034,
+ "p"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.a"
+ 0.222093,
+ "o"
],
[
- 2.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.ac"
+ 0.164027,
+ "r"
],
[
- 2.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.acc\u001b[J\u001b[2K\r"
+ 0.218852,
+ "t"
],
[
- 2.2e-05,
- "root@:26257> INSERT INTO bank.acco\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accou"
+ 0.994035,
+ "="
],
[
- 1.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accoun"
+ 0.641992,
+ "2"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.account"
+ 0.13592,
+ "6"
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts"
+ 0.121018,
+ "2"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts "
+ 0.092093,
+ "5"
],
[
- 2.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts V"
+ 0.334897,
+ "8"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VA"
+ 0.288967,
+ "\r\n"
],
[
- 1.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VAL"
+ 0.032201,
+ "# Welcome to the cockroach SQL interface.\r\n# All statements must be terminated by a semicolon.\r\n# To exit: CTRL + D.\r\n"
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALU"
+ 0.000857,
+ "\u001b[J\u001b[2K\rroot@:26258/> \b"
],
[
- 1.9e-05,
- "\u001b[J\u001b[2K\r"
+ 2.262109,
+ "\u001b[J\u001b[2K\rroot@:26258/> S"
],
[
- 2e-05,
- "root@:26257> INSERT INTO bank.accounts VALUE\u001b[J\u001b[2K\r"
+ 6.3e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SE\u001b[J\u001b[2K\rroot@:26258/> SEL\u001b[J\u001b[2K\rroot@:26258/> SELE"
],
[
- 2e-05,
- "root@:26257> INSERT INTO bank.accounts VALUES\u001b[J\u001b[2K\r"
+ 3.8e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELEC"
],
[
- 1.9e-05,
- "root@:26257> INSERT INTO bank.accounts VALUES "
+ 8.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT"
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES ("
+ 3.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT "
],
[
- 4.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1"
+ 6.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT *"
],
[
- 2.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1,"
+ 6.8e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * "
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1, "
+ 3.7e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * F"
],
[
- 2.1e-05,
- "\u001b[J\u001b[2K\r"
+ 4.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FR\u001b[J\u001b[2K\r"
],
[
- 2e-05,
- "root@:26257> INSERT INTO bank.accounts VALUES (1, 1\u001b[J\u001b[2K\r"
+ 4.6e-05,
+ "root@:26258/> SELECT * FRO\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM"
],
[
- 2e-05,
- "root@:26257> INSERT INTO bank.accounts VALUES (1, 10"
+ 3.6e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM \u001b[J\u001b[2K\r"
],
[
- 2.2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1, 100"
+ 3.6e-05,
+ "root@:26258/> SELECT * FROM b\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM ba"
],
[
- 2.4e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1, 1000"
+ 3.3e-05,
+ "\u001b[J\u001b[2K\r"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1, 1000."
+ 3.5e-05,
+ "root@:26258/> SELECT * FROM ban\u001b[J\u001b[2K\r"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\r"
+ 3.4e-05,
+ "root@:26258/> SELECT * FROM bank\u001b[J\u001b[2K\r"
],
[
- 2e-05,
- "root@:26257> INSERT INTO bank.accounts VALUES (1, 1000.5\u001b[J\u001b[2K\r"
+ 3.5e-05,
+ "root@:26258/> SELECT * FROM bank.\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.a"
],
[
- 2e-05,
- "root@:26257> INSERT INTO bank.accounts VALUES (1, 1000.50"
+ 3.4e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.ac"
],
[
- 1.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1, 1000.50)"
+ 5.9e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.acc"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\r"
+ 2.4e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.acco\u001b[J\u001b[2K\r"
],
[
2.1e-05,
- "root@:26257> INSERT INTO bank.accounts VALUES (1, 1000.50);"
+ "root@:26258/> SELECT * FROM bank.accou\u001b[J\u001b[2K\r"
],
[
- 2.015202,
- "\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1, 1000.50);\u001b[J\u001b[2K\rroot@:26257> INSERT INTO bank.accounts VALUES (1, 1000.50);\r\n"
+ 2.1e-05,
+ "root@:26258/> SELECT * FROM bank.accoun"
],
[
- 0.014399,
- "INSERT 1\r\n"
+ 2.1e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.account"
],
[
- 2.9e-05,
- "\u001b[J\u001b[2K\rroot@:26257> \b"
+ 2e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.accounts"
],
[
- 5.256049,
- "\u001b[J\u001b[2K\rroot@:26257> S\u001b[J\u001b[2K\r"
+ 8.2e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.accounts;"
],
[
- 5.5e-05,
- "root@:26257> SE\u001b[J\u001b[2K\rroot@:26257> SEL\u001b[J\u001b[2K\r"
+ 0.412423,
+ "\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.accounts;\u001b[J\u001b[2K\rroot@:26258/> SELECT * FROM bank.accounts;\r\n"
],
[
- 8.8e-05,
- "root@:26257> SELE\u001b[J\u001b[2K\rroot@:26257> SELEC\u001b[J\u001b[2K\rroot@:26257> SELECT"
+ 0.009814,
+ "+----+---------+\r\n| id | balance |\r\n+----+---------+\r\n| "
],
[
- 6.1e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT "
+ 2.9e-05,
+ " 1 | 1000.50 |\r\n+----+---------+\r\n(1 row)\r\n"
],
[
- 2.6e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT *\u001b[J\u001b[2K\r"
+ 0.000422,
+ "\u001b[J\u001b[2K\rroot@:26258/> \b"
],
[
- 2.2e-05,
- "root@:26257> SELECT * \u001b[J\u001b[2K\rroot@:26257> SELECT * F"
+ 1.736517,
+ "\u001b[J\u001b[2K\rroot@:26258/> \\"
],
[
- 2.7e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FR\u001b[J\u001b[2K\r"
+ 0.156887,
+ "\u001b[J\u001b[2K\rroot@:26258/> \\q"
],
[
- 2.1e-05,
- "root@:26257> SELECT * FRO\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM"
+ 0.232991,
+ "\u001b[J\u001b[2K\rroot@:26258/> \\q"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM "
+ 4.8e-05,
+ "\u001b[J\u001b[2K\rroot@:26258/> \\q\r\n"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM b\u001b[J\u001b[2K\r"
+ 0.000128,
+ "\u001b[J\u001b[2K\r"
],
[
- 2e-05,
- "root@:26257> SELECT * FROM ba\u001b[J\u001b[2K\r"
+ 0.003433,
+ "\u001b[32m~\u001b[m$ "
],
[
- 2e-05,
- "root@:26257> SELECT * FROM ban\u001b[J\u001b[2K\r"
+ 0.555258,
+ "\r\n"
],
[
- 2e-05,
- "root@:26257> SELECT * FROM bank\u001b[J\u001b[2K\r"
+ 0.000223,
+ "\u001b[32m~\u001b[m$ "
],
[
- 2.8e-05,
- "root@:26257> SELECT * FROM bank.\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM bank.a"
+ 5.136599,
+ "# S"
],
[
- 2.4e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM bank.ac\u001b[J\u001b[2K\r"
+ 0.00012,
+ "tep 4. When"
],
[
- 2.1e-05,
- "root@:26257> SELECT * FROM bank.acc\u001b[J\u001b[2K\r"
+ 4.2e-05,
+ " you'"
],
[
- 1.9e-05,
- "root@:26257> SELECT * FROM bank.acco\u001b[J\u001b[2K\r"
+ 4e-05,
+ "re"
],
[
- 2.7e-05,
- "root@:26257> SELECT * FROM bank.accou\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM bank.accoun"
+ 4.5e-05,
+ " f"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM bank.account"
+ 2.4e-05,
+ "in"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM bank.accounts"
+ 2.3e-05,
+ "is"
],
[
- 2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM bank.accounts;"
+ 2.3e-05,
+ "he"
],
[
- 1.620905,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM bank.accounts;"
+ 2.4e-05,
+ "d,"
],
[
- 5.2e-05,
- "\u001b[J\u001b[2K\rroot@:26257> SELECT * FROM bank.accounts;\r\n"
+ 2.1e-05,
+ " s"
],
[
- 0.001438,
- "+----+---------+\r\n| id | balance |\r\n+----+"
+ 2.4e-05,
+ "to"
],
[
- 4.5e-05,
- "---------+\r\n| 1 | 1000.5 |\r\n+"
+ 2.2e-05,
+ "p "
],
[
- 6.8e-05,
- "----+---------+\r\n(1 row)\r\n"
+ 2.2e-05,
+ "e"
],
[
- 4.3e-05,
- "\u001b[J\u001b[2K\rroot@:26257> \b"
+ 2.4e-05,
+ "ac"
],
[
- 2.953853,
- "\u001b[J\u001b[2K\rroot@:26257> \\"
+ 2.2e-05,
+ "h "
],
[
- 0.524929,
- "\u001b[J\u001b[2K\rroot@:26257> \\q"
+ 2.2e-05,
+ "n"
],
[
- 0.381229,
- "\u001b[J\u001b[2K\rroot@:26257> \\q\u001b[J\u001b[2K\rroot@:26257> \\q\r\n"
+ 2.2e-05,
+ "od"
],
[
- 5.8e-05,
- "\u001b[J\u001b[2K\r"
+ 2.3e-05,
+ "e"
],
[
- 0.003151,
- "\u001b[32m~\u001b[m$ "
+ 4.7e-05,
+ "."
],
[
- 3.900115,
+ 0.603758,
"\r\n"
],
[
- 8.2e-05,
+ 0.000163,
"\u001b[32m~\u001b[m$ "
],
[
- 4.079748,
- "# S"
- ],
- [
- 4.2e-05,
- "tep 5. When "
+ 1.410521,
+ "\r\n"
],
[
- 2.8e-05,
- "you'"
+ 0.000102,
+ "\u001b[32m~\u001b[m$ "
],
[
- 2.3e-05,
- "re "
+ 3.874456,
+ "coc"
],
[
- 0.000144,
- "finished, stop "
+ 3.9e-05,
+ "kroach qu"
],
[
- 2.6e-05,
- "eac"
+ 1.8e-05,
+ "it"
],
[
- 1.8e-05,
- "h "
+ 0.407663,
+ "\r\n"
],
[
- 1.7e-05,
- "n"
+ 0.048063,
+ "initiating graceful shutdown of server\r\n"
],
[
- 1.6e-05,
- "o"
+ 0.005045,
+ "ok\r\n"
],
[
- 1.7e-05,
- "de"
+ 0.001197,
+ "server drained and shutdown completed\r\n"
],
[
- 1.8e-05,
- "."
+ 0.002825,
+ "\u001b[32m~\u001b[m$ "
],
[
- 1.438268,
+ 4.953922,
"\r\n"
],
[
- 0.000214,
+ 8.5e-05,
"\u001b[32m~\u001b[m$ "
],
[
- 4.610304,
+ 0.581935,
"co"
],
[
- 0.000159,
- "ckroach quit"
+ 4.8e-05,
+ "ckroach"
],
[
- 1.676833,
- "\r\n"
+ 3.7e-05,
+ " qu"
],
[
- 6.149643,
- "initiating graceful shutdown of server\r\n"
+ 3.4e-05,
+ "it "
],
[
- 0.001306,
- "ok\r\n"
+ 3.5e-05,
+ "--"
],
[
- 0.000762,
- "server drained and shutdown completed\r\n"
+ 3.4e-05,
+ "por"
],
[
- 0.002949,
- "\u001b[32m~\u001b[m$ "
+ 3.4e-05,
+ "t="
],
[
- 2.361599,
- "\r\n"
+ 3.5e-05,
+ "2"
],
[
- 0.000162,
- "\u001b[32m~\u001b[m$ "
+ 0.000193,
+ "6258"
],
[
- 1.510694,
- "coc"
+ 0.432988,
+ "\r\n"
],
[
- 6e-05,
- "kroach "
+ 0.046197,
+ "initiating graceful shutdown of server\r\nok\r\n"
],
[
- 4.1e-05,
- "qui"
+ 5.4e-05,
+ "server drained and shutdown completed\r\n"
],
[
- 3.5e-05,
- "t"
+ 0.003774,
+ "\u001b[32m~\u001b[m$ "
],
[
- 4.3e-05,
- " --"
+ 1.109014,
+ "\r\n"
],
[
- 3.7e-05,
- "po"
+ 7.2e-05,
+ "\u001b[32m~\u001b[m$ "
],
[
- 4.6e-05,
- "rt="
+ 4.137569,
+ "p"
],
[
- 3.7e-05,
- "26"
+ 5.3e-05,
+ "s | gre"
],
[
3.8e-05,
- "25"
+ "p c"
],
[
- 3.9e-05,
- "8"
+ 4.4e-05,
+ "ock"
],
[
- 1.770387,
- "\r\n"
+ 3.5e-05,
+ "ro"
],
[
- 0.031183,
- "initiating graceful shutdown of server\r\n"
+ 3.9e-05,
+ "ach"
],
[
- 0.000922,
- "ok\r\n"
+ 0.591396,
+ "\r\n"
],
[
- 0.000536,
- "server drained and shutdown completed\r\n"
+ 0.010267,
+ " 9297 ttys001 0:01.07 cockroach start --store=node3 --port=26259 --http-port=8082 --join=localhost:26257\r\n 9303 ttys001 0:00.00 grep cockroach\r\n"
],
[
- 0.002729,
+ 0.00045,
"\u001b[32m~\u001b[m$ "
],
[
- 5.885721,
+ 1.64793,
"\r\n"
],
[
- 4.7e-05,
+ 0.000209,
"\u001b[32m~\u001b[m$ "
],
[
- 1.034757,
- "co"
- ],
- [
- 9.1e-05,
- "ckroa"
+ 0.656758,
+ "k"
],
[
- 9.6e-05,
- "ch"
+ 0.169919,
+ "i"
],
[
- 4.8e-05,
- " qui"
+ 0.191981,
+ "l"
],
[
- 5.2e-05,
- "t --"
+ 0.10999,
+ "l"
],
[
- 3.9e-05,
- "po"
+ 0.45395,
+ " "
],
[
- 3.7e-05,
- "rt"
+ 0.492074,
+ "-"
],
[
- 3.4e-05,
- "=2"
+ 0.322081,
+ "9"
],
[
- 3.5e-05,
- "62"
+ 0.197975,
+ " "
],
[
- 3.7e-05,
- "5"
+ 4.09181,
+ "929"
],
[
- 4e-05,
- "9"
+ 5.2e-05,
+ "7"
],
[
- 1.958228,
+ 0.520134,
"\r\n"
],
[
- 5.14306,
- "ok\r\ninitiating graceful shutdown of server\r\n"
- ],
- [
- 0.0017,
- "server drained and shutdown completed\r\n"
- ],
- [
- 0.001424,
+ 0.000685,
"\u001b[32m~\u001b[m$ "
]
- ],
- "title": null,
- "duration": 133.598459,
- "height": 31,
- "width": 145,
- "command": "/bin/bash -l",
- "version": 1,
- "env": {
- "TERM": "xterm-256color",
- "SHELL": "/bin/bash"
- }
+ ]
}
\ No newline at end of file
diff --git a/demo-automatic-rebalancing.md b/demo-automatic-rebalancing.md
index ccc0a8a21d4..976f1025c4f 100644
--- a/demo-automatic-rebalancing.md
+++ b/demo-automatic-rebalancing.md
@@ -150,7 +150,7 @@ Back in the Admin UI, you'll now see 5 nodes listed. At first, the bytes and rep
## Step 7. Stop the cluster
-You can stop the nodes (and therefore the cluster) as follows:
+Once you're done with your test cluster, use [`cockroach quit`](stop-a-node.html) to stop 4 of the 5 nodes:
~~~ shell
# Stop node 1:
@@ -164,12 +164,23 @@ $ cockroach quit --port=26259
# Stop node 4:
$ cockroach quit --port=26260
+~~~
+
+With only 1 node still online, a majority of replicas are no longer available (2 of 3), and so the cluster is not operational. As a result, you can't use `cockroach quit` to stop the last node, but instead must get the node's process ID and then force kill it:
+
+~~~ shell
+# Get the process ID for node 5:
+$ ps | grep cockroach
+~~~
-# Stop node 5:
-$ cockroach quit --port=26261
+~~~
+13400 ttys001 0:00.58 cockroach start --store=scale-node5 --port=26261 --http-port=8084 --join=localhost:26257
~~~
-For more details about the `cockroach quit` command, see [Stop a Node](stop-a-node.html).
+~~~ shell
+# Force quit the remaining node:
+$ kill -9 13400
+~~~
## What's Next?
diff --git a/demo-data-replication.md b/demo-data-replication.md
index 15415b84f46..81f2f42b64c 100644
--- a/demo-data-replication.md
+++ b/demo-data-replication.md
@@ -179,7 +179,7 @@ Back in the Admin UI, you'll see that there are now 5 nodes listed. Again, at fi
## Step 8. Stop the cluster
-You can stop the nodes (and therefore the cluster) as follows:
+Once you're done with your test cluster, use [`cockroach quit`](stop-a-node.html) to stop 3 of the 5 nodes:
~~~ shell
# Stop node 1:
@@ -190,15 +190,25 @@ $ cockroach quit --port=26258
# Stop node 3:
$ cockroach quit --port=26259
+~~~
-# Stop node 4:
-$ cockroach quit --port=26260
+With only 2 nodes still online, a majority of replicas are no longer available (3 of 5), and so the cluster is not operational. As a result, you can't use `cockroach quit` to stop the last nodes, but instead must get the nodes' process IDs and then force kill them:
-# Stop node 5:
-$ cockroach quit --port=26261
+~~~ shell
+# Get the process ID for node 4 and 5:
+$ ps | grep cockroach
~~~
-For more details about the `cockroach quit` command, see [Stop a Node](stop-a-node.html).
+~~~
+13398 ttys001 0:00.67 cockroach start --store=repdemo-node4 --port=26260 --http-port=8083 --join=localhost:26257
+13400 ttys001 0:00.58 cockroach start --store=repdemo-node5 --port=26261 --http-port=8084 --join=localhost:26257
+~~~
+
+~~~ shell
+# Force quit the remaining nodes:
+$ kill -9 13398
+$ kill -9 13400
+~~~
## What's Next?
diff --git a/demo-fault-tolerance-and-recovery.md b/demo-fault-tolerance-and-recovery.md
index 9a00c7389a0..37a1ce975a9 100644
--- a/demo-fault-tolerance-and-recovery.md
+++ b/demo-fault-tolerance-and-recovery.md
@@ -298,20 +298,32 @@ After about 10 minutes, node 2 will move into a **Dead Nodes** section, indicati
## Step 10. Stop the cluster
-You can stop the nodes (and therefore the cluster) as follows:
+Once you're done with your test cluster, use [`cockroach quit`](stop-a-node.html) to stop 2 of the 3 nodes:
~~~ shell
# Stop node 1:
$ cockroach quit
-# Stop node 3:
-$ cockroach quit --port=26259
+# Stop node 2:
+$ cockroach quit --port=26258
+
+~~~
+
+With only 1 node still online, a majority of replicas are no longer available (2 of 3), and so the cluster is not operational. As a result, you can't use `cockroach quit` to stop the last node, but instead must get the node's process ID and then force kill it:
+
+~~~ shell
+# Get the process ID for node 3:
+$ ps | grep cockroach
+~~~
-# Stop node 4:
-$ cockroach quit --port=26260
+~~~
+13398 ttys001 0:00.67 cockroach start --store=fault-node3 --port=26259 --http-port=8082 --join=localhost:26257
~~~
-For more details about the `cockroach quit` command, see [Stop a Node](stop-a-node.html).
+~~~ shell
+# Force quit node 3:
+$ kill -9 13398
+~~~
## What's Next?
diff --git a/images/admin_ui.png b/images/admin_ui.png
index 0d03ea28261..2da47809708 100644
Binary files a/images/admin_ui.png and b/images/admin_ui.png differ
diff --git a/images/admin_ui_replicas.png b/images/admin_ui_replicas.png
new file mode 100644
index 00000000000..93a8f00ed34
Binary files /dev/null and b/images/admin_ui_replicas.png differ
diff --git a/secure-a-cluster.md b/secure-a-cluster.md
index cb91357bd45..a8131056561 100644
--- a/secure-a-cluster.md
+++ b/secure-a-cluster.md
@@ -5,13 +5,15 @@ toc: false
asciicast: true
---
-Now that you've seen how easy it is to start, use, and stop a [local cluster](start-a-local-cluster.html), let's secure the cluster with authentication and encryption. This involves creating certificates and restarting nodes with a few additional flags.
+Now that you've seen how easy it is to [start, use, and stop a local cluster](start-a-local-cluster.html), let's secure the cluster with authentication and encryption. This involves creating certificates and restarting nodes with a few additional flags.
PS C:\Users\username> docker network create -d bridge roachnet
<username>
in the -v
flag with your actual username.{{site.data.alerts.end}}
@@ -54,17 +58,21 @@ cockroachdb/cockroach:beta-20170209 start --insecure/cockroach-data/roach1:/cockroach/cockroach-data"`: This flag mounts a host directory as a data volume. This means that data and logs for this node will be stored in `Users/--cache
flag in the start
command.{{site.data.alerts.end}}
-## Step 3. Start additional containers/nodes
+## Step 3. Add nodes to the cluster
+
+At this point, your cluster is live and operational. With just one node, you can already connect a SQL client and start building out your database. In real deployments, however, you'll always want 3 or more nodes to take advantage of CockroachDB's [automatic replication](demo-data-replication.html), [rebalancing](demo-automatic-rebalancing.html), and [fault tolerance](demo-fault-tolerance-and-recovery.html) capabilities.
+
+To simulate a real deployment, scale your cluster by adding two more nodes:
{{site.data.alerts.callout_info}}Again, be sure to replace <username>
in the -v
flag with your actual username.{{site.data.alerts.end}}
@@ -89,42 +97,24 @@ These commands add two more containers and start CockroachDB nodes inside them,
- `-v`: This flag mounts a host directory as a data volume. Data and logs for these nodes will be stored in `Users/PS C:\Users\username> docker exec -it roach1 ./cockroach sql
# Welcome to the cockroach SQL interface.
# All statements must be terminated by a semicolon.
# To exit: CTRL + D.
PS C:\Users\username> docker exec -it roach2 ./cockroach sql
# Welcome to the cockroach SQL interface.
# All statements must be terminated by a semicolon.
# To exit: CTRL + D.
--cache
flag in the start
command.{{site.data.alerts.end}}
-- The `--background` flag runs the node in the background so you can continue the next steps in the same shell.
+## Step 2. Add nodes to the cluster
-- The [standard output](start-a-node.html#standard-output) gives you a helpful summary: the CockroachDB version; the URL for the admin UI; the SQL URL for your client code; the storage locations for node and debug log data; whether the node is the first in the cluster, joined an existing cluster for the first time, or rejoined an existing cluster; the cluster ID; and the node ID.
+At this point, your cluster is live and operational. With just one node, you can already connect a SQL client and start building out your database. In real deployments, however, you'll always want 3 or more nodes to take advantage of CockroachDB's [automatic replication](demo-data-replication.html), [rebalancing](demo-automatic-rebalancing.html), and [fault tolerance](demo-fault-tolerance-and-recovery.html) capabilities.
-{{site.data.alerts.callout_success}}By default, each node's cache is limited to 25% of available memory. This default is reasonable when running one node per host. When running multiple nodes on a single host, however, it may lead to out of memory errors, especially when testing against the cluster in a serious way. To avoid such errors, you can manually limit each node's cache size by setting the --cache
flag in the start
command.{{site.data.alerts.end}}
+To simulate a real deployment, scale your cluster by adding two more nodes:
-## Step 2. Add nodes to the cluster
-
~~~ shell
-# Start your second node:
+# Start the second node:
$ cockroach start --background \
--store=node2 \
--port=26258 \
--http-port=8081 \
--join=localhost:26257
-# Start your third node:
+# Start the third node:
$ cockroach start --background \
--store=node3 \
--port=26259 \
@@ -69,21 +69,13 @@ $ cockroach start --background \
--join=localhost:26257
~~~
-These commands add two nodes to the cluster, but you can add as many as you like. For each node:
-
-- Set the `--store` flag to a storage location not in use by other nodes. To use multiple stores, set this flag separately for each.
-
-- Set the `--port` and `--http-port` flags to ports not in use by other nodes.
-
-- The `--join` flag connects the new node to the cluster. Set this flag to `localhost` and the port of the first node.
-
-- The `--background` flag runs the node in the background so you can continue the next steps in the same shell.
+The main difference here is that you use the `--join` flag to connect the new nodes to the cluster, specifying the address and port of the first node. Since you're running all nodes on the same machine, you also set the `--store`, `--port`, and `--http-port` flags to locations and ports not used by other nodes, but in a real deployment, with each node on a different machine, the defaults would suffice.
-{{site.data.alerts.callout_success}}If you don't plan to use more than one node, you can avoid unnecessary log messages about replication by editing the default replication zone to specify one node instead of three. See here for more details.{{site.data.alerts.end}}
+## Step 3. Test the cluster
-## Step 3. Use the built-in SQL client
+Now that you've scaled to 3 nodes, you can use any node as a SQL gateway to the cluster. To demonstrate this, start the [built-in SQL client](use-the-built-in-sql-client.html) on node 1:
-Start the [built-in SQL shell](use-the-built-in-sql-client.html) on node 1:
+{{site.data.alerts.callout_info}}The SQL client is built into the cockroach
binary, so nothing extra is needed.{{site.data.alerts.end}}
~~~ shell
$ cockroach sql
@@ -92,32 +84,46 @@ $ cockroach sql
# To exit: CTRL + D.
~~~
-Then run some [CockroachDB SQL statements](learn-cockroachdb-sql.html):
+Run some basic [CockroachDB SQL statements](learn-cockroachdb-sql.html):
~~~ sql
> CREATE DATABASE bank;
-~~~
-~~~
-CREATE DATABASE
-~~~
-
-~~~ sql
> CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);
+
+> INSERT INTO bank.accounts VALUES (1, 1000.50);
+
+> SELECT * FROM bank.accounts;
~~~
~~~
-CREATE TABLE
++----+---------+
+| id | balance |
++----+---------+
+| 1 | 1000.5 |
++----+---------+
+(1 row)
~~~
+Exit the SQL shell on node 1:
+
~~~ sql
-> INSERT INTO bank.accounts VALUES (1, 1000.50);
+> \q
~~~
-~~~
-INSERT 1
+Then start the SQL shell on node 2, this time specifying the node's non-default port:
+
+~~~ shell
+$ cockroach sql --port=26258
+# Welcome to the cockroach SQL interface.
+# All statements must be terminated by a semicolon.
+# To exit: CTRL + D.
~~~
+{{site.data.alerts.callout_info}}In a real deployment, all nodes would likely use the default port 26257
, and so you wouldn't need to set the --port
flag.{{site.data.alerts.end}}
+
+Now run the same `SELECT` query:
+
~~~ sql
> SELECT * FROM bank.accounts;
~~~
@@ -131,38 +137,86 @@ INSERT 1
(1 row)
~~~
-When you're done, use **CTRL + D**, **CTRL + C**, or `\q` to exit the SQL shell.
+As you can see, node 1 and node 2 behaved identically as SQL gateways.
-## Step 4. Open the Admin UI
+When you're done, exit the SQL shell on node 2:
+
+~~~ sql
+> \q
+~~~
-The CockroachDB [Admin UI](explore-the-admin-ui.html) lets you monitor cluster-wide, node-level, and database-level metrics and events. To start up the Admin UI, point your browser to `http://localhost:8080`. You can also find the address in the `admin` field in the standard output of any node on startup.
+## Step 4. Monitor the cluster
-{% include prometheus-callout.html %}
+To access the [Admin UI](explore-the-admin-ui.html) for your cluster, point a browser to `http://localhost:8080`, or to the address in the `admin` field in the standard output of any node on startup: