Skip to content

Commit

Permalink
Update CREATE EXTENSION parts (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonels-msft committed Mar 5, 2020
1 parent 8c3685d commit c1a49d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions articles/hll_count_distinct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,13 @@ To play with HLL we will use Citus Cloud and GitHub events data. You can
see and learn more about Citus Cloud and this data set from
`here <https://www.citusdata.com/blog/2017/01/27/getting-started-with-github-events-data/>`__.
Assuming you created your Citus Cloud instance and connected it via
psql, you can create HLL extension by;
psql, you can create HLL extension by simply running the below command from the coordinator;

.. code:: sql
CREATE EXTENSION hll;
You should create the extension at master and all workers. Then enable
count distinct approximations by setting the
Then enable count distinct approximations by setting the
*citus.count\_distinct\_error\_rate* configuration value. Lower values
for this configuration setting are expected to give more accurate
results but take more time and use more memory for computation. We
Expand Down
4 changes: 2 additions & 2 deletions develop/reference_sql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ For increased performance you can choose to make an approximate count instead. F

Please visit the PostgreSQL hll `github repository <https://github.com/citusdata/postgresql-hll>`_ for specifics on obtaining the extension.

2. Create the hll extension on all the PostgreSQL instances
2. Create the hll extension on all the PostgreSQL instances by simply running the below command from the coordinator

.. code-block:: postgresql
Expand Down Expand Up @@ -131,8 +131,8 @@ Next we'll add the extension, create a destination table to store the json data

.. code-block:: postgresql
-- run below command from coordinator, it will be propagated to the worker nodes as well
CREATE EXTENSION topn;
SELECT run_command_on_workers(' create extension topn; ');
-- a table to materialize the daily aggregate
CREATE TABLE reviews_by_day
Expand Down

0 comments on commit c1a49d3

Please sign in to comment.