From 5fcbc7ab8525d2ce7abf5243ce510c42981661ed Mon Sep 17 00:00:00 2001 From: Rajakavitha1 Date: Wed, 16 Aug 2023 14:47:54 +0530 Subject: [PATCH 1/3] remove examples for space partition --- api/add_data_node.md | 12 +++++------- api/create_hypertable.md | 13 ------------- .../create-distributed-hypertables.md | 4 +--- use-timescale/hypertables/about-hypertables.md | 18 ------------------ 4 files changed, 6 insertions(+), 41 deletions(-) diff --git a/api/add_data_node.md b/api/add_data_node.md index 78eb7fb68a..8056ce5aa7 100644 --- a/api/add_data_node.md +++ b/api/add_data_node.md @@ -101,16 +101,14 @@ TimescaleDB extension on the data node unless it is already installed. ### Sample usage -Let's assume that you have an existing hypertable `conditions` and -want to use `time` as the time partitioning column and `location` as -the space partitioning column. You also want to distribute the chunks -of the hypertable on two data nodes `dn1.example.com` and -`dn2.example.com`: +Let's assume that you have an existing hypertable `conditions` and want to use +`time` as the time partitioning column. You also want to distribute the chunks +of the hypertable on two data nodes `dn1.example.com` and `dn2.example.com`: ```sql SELECT add_data_node('dn1', host => 'dn1.example.com'); SELECT add_data_node('dn2', host => 'dn2.example.com'); -SELECT create_distributed_hypertable('conditions', 'time', 'location'); +SELECT create_distributed_hypertable('conditions', 'time'); ``` If you want to create a distributed database with the two data nodes @@ -119,7 +117,7 @@ local to this instance, you can write: ```sql SELECT add_data_node('dn1', host => 'localhost', database => 'dn1'); SELECT add_data_node('dn2', host => 'localhost', database => 'dn2'); -SELECT create_distributed_hypertable('conditions', 'time', 'location'); +SELECT create_distributed_hypertable('conditions', 'time'); ``` Note that this does not offer any performance advantages over using a diff --git a/api/create_hypertable.md b/api/create_hypertable.md index f0cf7d6d39..736b7bc15f 100644 --- a/api/create_hypertable.md +++ b/api/create_hypertable.md @@ -147,19 +147,6 @@ SELECT create_hypertable('conditions', 'time', chunk_time_interval => 8640000000 SELECT create_hypertable('conditions', 'time', chunk_time_interval => INTERVAL '1 day'); ``` -Convert table `conditions` to hypertable with time partitioning on `time` and -space partitioning (4 partitions) on `location`: - -```sql -SELECT create_hypertable('conditions', 'time', 'location', 4); -``` - -The same as above, but using a custom partitioning function: - -```sql -SELECT create_hypertable('conditions', 'time', 'location', 4, partitioning_func => 'location_hash'); -``` - Convert table `conditions` to hypertable. Do not raise a warning if `conditions` is already a hypertable: diff --git a/self-hosted/distributed-hypertables/create-distributed-hypertables.md b/self-hosted/distributed-hypertables/create-distributed-hypertables.md index 560e973f26..3a579b1f52 100644 --- a/self-hosted/distributed-hypertables/create-distributed-hypertables.md +++ b/self-hosted/distributed-hypertables/create-distributed-hypertables.md @@ -35,8 +35,7 @@ hypertable. To set up multi-node, see the 1. Convert the table to a distributed hypertable. Specify the name of the table you want to convert, the column that holds its time values, and a - space-partitioning parameter. For more information about space partitions, - see the [space-partitioning section][space-partitions]. + space-partitioning parameter. ```sql SELECT create_distributed_hypertable('conditions', 'time', 'location'); @@ -46,4 +45,3 @@ hypertable. To set up multi-node, see the [multi-node]: /self-hosted/:currentVersion:/multinode-timescaledb/ [postgres-createtable]: https://www.postgresql.org/docs/current/sql-createtable.html -[space-partitions]: /use-timescale/:currentVersion:/hypertables/about-hypertables#space-partitions-for-distributed-hypertables diff --git a/use-timescale/hypertables/about-hypertables.md b/use-timescale/hypertables/about-hypertables.md index 01c2e27553..a2d0b9e151 100644 --- a/use-timescale/hypertables/about-hypertables.md +++ b/use-timescale/hypertables/about-hypertables.md @@ -73,24 +73,6 @@ For a detailed analysis of how to optimize your chunk sizes, see the to view and set your chunk time intervals, see the section on [changing hypertable chunk intervals][change-chunk-intervals]. -### Space partitioning - -Space partitioning is optional. It is not usually recommended for regular -hypertables. - -A good alternative way to increase input/output performance on single -hypertables is to use RAID (redundant array of inexpensive disks). RAID -virtualizes multiple physical disks into a single logical disk. You can then use -this single logical disk to store your hypertable, without any space -partitioning. - -Space partitioning is useful if you have multiple physical disks, each -corresponding to a separate tablespace. Each disk can then store some of the -space partitions. If you partition by space without this setup, you increase -query planning complexity without increasing I/O performance. For more -information, see the -[distributed hypertables][about-distributed-hypertables] section. - ## Hypertable indexes By default, indexes are automatically created when you create a hypertable. You From dcf8a4979cb0778b23fa3e7e1e9213bb1f4e9af0 Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Wed, 16 Aug 2023 19:49:32 +0530 Subject: [PATCH 2/3] make vale happy Signed-off-by: Rajakavitha Kodhandapani --- api/add_data_node.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/add_data_node.md b/api/add_data_node.md index 8056ce5aa7..05ca8a6798 100644 --- a/api/add_data_node.md +++ b/api/add_data_node.md @@ -101,8 +101,8 @@ TimescaleDB extension on the data node unless it is already installed. ### Sample usage -Let's assume that you have an existing hypertable `conditions` and want to use -`time` as the time partitioning column. You also want to distribute the chunks +If you have an existing hypertable `conditions` and want to use `time` +as the time partitioning column. You also want to distribute the chunks of the hypertable on two data nodes `dn1.example.com` and `dn2.example.com`: ```sql From 8cd30e6d448325d07284cdd89367c1d9e66b8db7 Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Sun, 20 Aug 2023 08:37:36 +0530 Subject: [PATCH 3/3] Update add_data_node.md added the location space partition to the examples Signed-off-by: Rajakavitha Kodhandapani --- api/add_data_node.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/add_data_node.md b/api/add_data_node.md index 05ca8a6798..55ff6178ae 100644 --- a/api/add_data_node.md +++ b/api/add_data_node.md @@ -102,13 +102,14 @@ TimescaleDB extension on the data node unless it is already installed. ### Sample usage If you have an existing hypertable `conditions` and want to use `time` -as the time partitioning column. You also want to distribute the chunks -of the hypertable on two data nodes `dn1.example.com` and `dn2.example.com`: +as the time partitioning column and `location` as the space partitioning +column. You also want to distribute the chunks of the hypertable on two +data nodes `dn1.example.com` and `dn2.example.com`: ```sql SELECT add_data_node('dn1', host => 'dn1.example.com'); SELECT add_data_node('dn2', host => 'dn2.example.com'); -SELECT create_distributed_hypertable('conditions', 'time'); +SELECT create_distributed_hypertable('conditions', 'time', 'location'); ``` If you want to create a distributed database with the two data nodes @@ -117,7 +118,7 @@ local to this instance, you can write: ```sql SELECT add_data_node('dn1', host => 'localhost', database => 'dn1'); SELECT add_data_node('dn2', host => 'localhost', database => 'dn2'); -SELECT create_distributed_hypertable('conditions', 'time'); +SELECT create_distributed_hypertable('conditions', 'time', 'location'); ``` Note that this does not offer any performance advantages over using a