Skip to content

Commit ce87ccb

Browse files
authored
Fix anchor link (github#1385)
1 parent a93116e commit ce87ccb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

timescaledb/how-to-guides/hypertables/change-chunk-intervals.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ tags: [performance]
66
---
77

88
# Change hypertable chunk intervals
9+
910
Adjusting your hypertable chunk interval can improve TimescaleDB performance.
1011
This applies to both regular and distributed hypertables. For more information,
1112
see [best practices for time partitioning][best-practices].
1213

1314
## Check current setting for chunk intervals
15+
1416
Check the current setting for chunk intervals by querying the TimescaleDB
1517
catalog.
18+
1619
```sql
1720
SELECT h.table_name, c.interval_length
1821
FROM _timescaledb_catalog.dimension c
@@ -21,6 +24,7 @@ SELECT h.table_name, c.interval_length
2124
```
2225

2326
The result looks like this:
27+
2428
```sql
2529
table_name | interval_length
2630
-----------+-----------------
@@ -33,9 +37,11 @@ Time-based interval lengths are reported in microseconds.
3337
</highlight>
3438

3539
## Change the chunk interval length when creating a hypertable
40+
3641
The default chunk interval is 7 days. To change this when creating a hypertable,
3742
specify a different `chunk_time_interval` when calling `create_hypertable` or
3843
`create_distributed_hypertable`.
44+
3945
```sql
4046
SELECT create_hypertable(
4147
'conditions',
@@ -48,8 +54,10 @@ In this example, the table to convert is named `conditions`, and it stores time
4854
values in a column named `time`.
4955

5056
## Change the chunk interval length on an existing hypertable
57+
5158
To change the chunk interval on an already existing hypertable or distributed
5259
hypertable, use the function `set_chunk_time_interval`:
60+
5361
```sql
5462
SELECT set_chunk_time_interval('conditions', INTERVAL '24 hours');
5563
```
@@ -65,4 +73,4 @@ shorten the chunk for that year. In this situation, you can create a new
6573
hypertable and migrate your data.
6674
</highlight>
6775

68-
[best-practices]: /timescaledb/:currentVersion:/how-to-guides/hypertables/about-hypertables#best-practices
76+
[best-practices]: /timescaledb/:currentVersion:/how-to-guides/hypertables/about-hypertables#best-practices-for-time-partitioning

0 commit comments

Comments
 (0)