Skip to content

Commit d112226

Browse files
authored
Merge pull request #188229 from jonels-msft/hsc-quick-gary
Suggestions from Gary for our Hyperscale quickstart
2 parents 9cdf192 + 8133685 commit d112226

File tree

7 files changed

+52
-25
lines changed

7 files changed

+52
-25
lines changed

articles/postgresql/hyperscale/quickstart-connect-psql.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,23 @@ When you create your Hyperscale (Citus) server group, a default database named *
6060
citus=>
6161
```
6262

63+
4. Run a test query. Copy the following command and paste it into the psql
64+
prompt, then press enter to run:
65+
66+
```sql
67+
SHOW server_version;
68+
```
69+
70+
You should see a result matching the PostgreSQL version you selected
71+
during server group creation. For instance:
72+
73+
```
74+
server_version
75+
----------------
76+
13.5
77+
(1 row)
78+
```
79+
6380
## Next steps
6481

6582
Now that you've connected to the server group, the next step is to create

articles/postgresql/hyperscale/quickstart-create-portal.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,27 @@ To follow this quickstart, you'll first need to:
4646
| Admin username | Currently required to be the value `citus`, and can't be changed. |
4747
| Password | A new password for the server admin account. It must contain between 8 and 128 characters. Your password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers (0 through 9), and non-alphanumeric characters (!, $, #, %, etc.). |
4848
| Version | The latest PostgreSQL major version, unless you have specific requirements. |
49-
| Compute + storage | The compute, storage, and Tier configurations for your new server. Select **Configure server group**. |
49+
50+
5. Select **Configure server group**.
5051

5152
![compute and storage](../media/quickstart-hyperscale-create-portal/compute.png)
5253

53-
5. For this quickstart, you can accept the default value of **Basic** for
54+
For this quickstart, you can accept the default value of **Basic** for
5455
**Tiers**. The other option, standard tier, creates worker nodes for
5556
greater total data capacity and query parallelism. See
5657
[tiers](concepts-server-group.md#tiers) for a more in-depth comparison.
57-
6. Select **Next : Networking >** at the bottom of the screen.
58-
7. In the **Networking** tab, select **Allow public access from Azure services
58+
59+
6. Select **Save**.
60+
61+
7. Select **Next : Networking >** at the bottom of the screen.
62+
8. In the **Networking** tab, select **Allow public access from Azure services
5963
and resources within Azure to this server group**.
6064

6165
![networking configuration](../media/quickstart-hyperscale-create-portal/networking.png)
6266

63-
8. Select **Review + create** and then **Create** to create the server.
67+
9. Select **Review + create** and then **Create** to create the server.
6468
Provisioning takes a few minutes.
65-
9. The page will redirect to monitor deployment. When the live status changes
69+
10. The page will redirect to monitor deployment. When the live status changes
6670
from **Deployment is in progress** to **Your deployment is complete**.
6771
After this transition, select **Go to resource**.
6872

articles/postgresql/hyperscale/quickstart-distribute-tables.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,16 @@ By default, `create_distributed_table()` splits tables into 32 shards. We can
8888
verify using the `citus_shards` view:
8989

9090
```sql
91-
SELECT table_name, count(*)
91+
SELECT table_name, count(*) AS shards
9292
FROM citus_shards
9393
GROUP BY 1;
9494
```
9595

9696
```
97-
table_name | count
98-
---------------+-------
99-
github_events | 32
100-
github_users | 32
97+
table_name | shards
98+
---------------+--------
99+
github_users | 32
100+
github_events | 32
101101
(2 rows)
102102
```
103103

@@ -106,21 +106,31 @@ SELECT table_name, count(*)
106106
We're ready to fill the tables with sample data. For this quickstart, we'll use
107107
a dataset previously captured from the GitHub API.
108108

109+
Run the following commands to download example CSV files and load them into the
110+
database tables. (The `curl` command downloads the files, and comes
111+
pre-installed in the Azure Cloud Shell.)
112+
109113
```
114+
-- download users and store in table
115+
110116
\COPY github_users FROM PROGRAM 'curl https://examples.citusdata.com/users.csv' WITH (FORMAT CSV)
117+
118+
-- download events and store in table
119+
111120
\COPY github_events FROM PROGRAM 'curl https://examples.citusdata.com/events.csv' WITH (FORMAT CSV)
112121
```
113122

114123
We can confirm the shards now hold data:
115124

116125
```sql
117-
SELECT table_name, pg_size_pretty(sum(shard_size))
126+
SELECT table_name,
127+
pg_size_pretty(sum(shard_size)) AS shard_size_sum
118128
FROM citus_shards
119129
GROUP BY 1;
120130
```
121131

122132
```
123-
table_name | pg_size_pretty
133+
table_name | shard_size_sum
124134
---------------+----------------
125135
github_users | 38 MB
126136
github_events | 95 MB

articles/postgresql/hyperscale/quickstart-run-queries.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ SELECT count(*) FROM github_users;
4343

4444
Recall that `github_users` is a distributed table, meaning its data is divided
4545
between multiple shards. Hyperscale (Citus) automatically runs the count on all
46-
the shards in parallel, and combines the results.
46+
shards in parallel, and combines the results.
47+
48+
Let's continue looking at a few more query examples:
4749

4850
```sql
4951
-- Find all events for a single user.
@@ -67,10 +69,6 @@ SELECT created_at, event_type, repo->>'name' AS repo_name
6769

6870
## More complicated queries
6971

70-
Hyperscale (Citus) uses an advanced query planner to transform arbitrary SQL
71-
queries into tasks running across shards. The tasks run in parallel on
72-
horizontally scalable worker nodes.
73-
7472
Here's an example of a more complicated query, which retrieves hourly
7573
statistics for push events on GitHub. It uses PostgreSQL's JSONB feature to
7674
handle semi-structured data.
@@ -98,7 +96,7 @@ ORDER BY hour;
9896
(4 rows)
9997
```
10098

101-
Hyperscale (Citus) also automatically applies changes to data definition across
99+
Hyperscale (Citus) also automatically applies data definition changes across
102100
the shards of a distributed table.
103101

104102
```sql
@@ -113,12 +111,10 @@ The quickstart is now complete. You've successfully created a scalable
113111
Hyperscale (Citus) server group, created tables, sharded them, loaded data, and
114112
run distributed queries.
115113

116-
Here are good resources to begin to deepen your knowledge.
114+
Here are good resources to deepen your knowledge.
117115

118116
* See a more detailed [illustration](tutorial-shard.md) of distributed query
119117
execution.
120-
* Discover [useful diagnostic queries](howto-useful-diagnostic-queries.md) to
121-
inspect distributed tables.
122-
* Learn how to speed up the per-minute `http_request` aggregation from this
123-
example with "roll-ups" in the [real-time
124-
dashboard](tutorial-design-database-realtime.md) tutorial.
118+
* Scale your server group by [adding
119+
nodes](howto-scale-grow.md#add-worker-nodes) and [rebalancing
120+
shards](howto-scale-rebalance.md).
-237 KB
Loading
-381 KB
Loading
174 KB
Loading

0 commit comments

Comments
 (0)