Skip to content

Commit

Permalink
Add admin > database docs to Core and Enterprise (#5813)
Browse files Browse the repository at this point in the history
* add influxdb3 database admin docs

* Apply suggestions from code review

Co-authored-by: Jason Stirnaman <[email protected]>

---------

Co-authored-by: Jason Stirnaman <[email protected]>
  • Loading branch information
sanderson and jstirnaman authored Feb 3, 2025
1 parent d73e99d commit ebf9b1b
Show file tree
Hide file tree
Showing 19 changed files with 571 additions and 3 deletions.
15 changes: 15 additions & 0 deletions content/influxdb3/core/admin/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Administer {{< product-name >}}
description: >
Perform administrative tasks in {{< product-name >}} such as creating and
managing databases and tokens.
menu:
influxdb3_core:
name: Administer InfluxDB
weight: 11
source: /shared/influxdb3-admin/_index.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/_index.md
-->
25 changes: 25 additions & 0 deletions content/influxdb3/core/admin/databases/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Manage databases
seotitle: Manage databases in {{< product-name >}}
description: >
An {{< product-name >}} database is a named location where time series data is
stored. Each database can contain multiple tables.
menu:
influxdb3_core:
parent: Administer InfluxDB
weight: 103
influxdb3/core/tags: [databases]
related:
- /influxdb3/core/write-data/best-practices/schema-design/
- /influxdb3/core/reference/cli/influxdb3/
alt_links:
cloud: /influxdb/cloud/admin/buckets/
cloud_dedicated: /influxdb3/cloud-dedicated/admin/databases/
cloud_serverless: /influxdb3/cloud-serverless/admin/buckets/
v2: /influxdb/v2/admin/buckets/
source: /shared/influxdb3-admin/databases/_index.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/databases/_index.md
-->
25 changes: 25 additions & 0 deletions content/influxdb3/core/admin/databases/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Create a database
description: >
Use the [`influxdb3 create database` command](/influxdb3/core/reference/cli/influxdb3/create/database/)
to create a new database in {{< product-name >}}.
menu:
influxdb3_core:
parent: Manage databases
weight: 201
list_code_example: |
<!--pytest.mark.skip-->
{{% code-placeholders "DATABASE_NAME" %}}
```sh
influxdb3 create database DATABASE_NAME
```
{{% /code-placeholders %}}
related:
- /influxdb3/core/reference/cli/influxdb3/create/database/
source: /shared/influxdb3-admin/databases/create.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/databases/create.md
-->
24 changes: 24 additions & 0 deletions content/influxdb3/core/admin/databases/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Delete a database
description: >
Use the [`influxdb3 delete database` command](/influxdb3/core/reference/cli/influxdb3/delete/database/)
to delete a database from {{< product-name >}}.
Provide the name of the database you want to delete.
menu:
influxdb3_core:
parent: Manage databases
weight: 203
list_code_example: |
{{% code-placeholders "DATABASE_NAME" %}}
```sh
influxdb3 delete database DATABASE_NAME
```
{{% /code-placeholders %}}
related:
- /influxdb3/core/reference/cli/influxdb3/delete/database/
source: /shared/influxdb3-admin/databases/delete.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/databases/delete.md
-->
21 changes: 21 additions & 0 deletions content/influxdb3/core/admin/databases/list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: List databases
description: >
Use the [`influxdb3 show databases` command](/influxdb3/core/reference/cli/influxdb3/show/databases/)
to list databases in {{< product-name >}}.
menu:
influxdb3_core:
parent: Manage databases
weight: 202
list_code_example: |
```sh
influxdb3 show databases
```
related:
- /influxdb3/core/reference/cli/influxdb3/show/databases/
source: /shared/influxdb3-admin/databases/list.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/databases/list.md
-->
2 changes: 1 addition & 1 deletion content/influxdb3/core/visualize-data/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: >
Use visualization tools like Grafana, Superset, and others to visualize time
series data stored in InfluxDB 3 Core.
menu: influxdb3_core
weight: 19
weight: 10
related:
- /influxdb3/clustered/query-data/
---
Expand Down
15 changes: 15 additions & 0 deletions content/influxdb3/enterprise/admin/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Administer {{< product-name >}}
description: >
Perform administrative tasks in {{< product-name >}} such as creating and
managing databases and tokens.
menu:
influxdb3_enterprise:
name: Administer InfluxDB
weight: 11
source: /shared/influxdb3-admin/_index.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/_index.md
-->
25 changes: 25 additions & 0 deletions content/influxdb3/enterprise/admin/databases/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Manage databases
seotitle: Manage databases in {{< product-name >}}
description: >
An {{< product-name >}} database is a named location where time series data is
stored. Each database can contain multiple tables.
menu:
influxdb3_enterprise:
parent: Administer InfluxDB
weight: 103
influxdb3/enterprise/tags: [databases]
related:
- /influxdb3/enterprise/write-data/best-practices/schema-design/
- /influxdb3/enterprise/reference/cli/influxdb3/
alt_links:
cloud: /influxdb/cloud/admin/buckets/
cloud_dedicated: /influxdb3/cloud-dedicated/admin/databases/
cloud_serverless: /influxdb3/cloud-serverless/admin/buckets/
v2: /influxdb/v2/admin/buckets/
source: /shared/influxdb3-admin/databases/_index.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/databases/_index.md
-->
25 changes: 25 additions & 0 deletions content/influxdb3/enterprise/admin/databases/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Create a database
description: >
Use the [`influxdb3 create database` command](/influxdb3/enterprise/reference/cli/influxdb3/create/database/)
to create a new database in {{< product-name >}}.
menu:
influxdb3_enterprise:
parent: Manage databases
weight: 201
list_code_example: |
<!--pytest.mark.skip-->
{{% code-placeholders "DATABASE_NAME" %}}
```sh
influxdb3 create database DATABASE_NAME
```
{{% /code-placeholders %}}
related:
- /influxdb3/enterprise/reference/cli/influxdb3/create/database/
source: /shared/influxdb3-admin/databases/create.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/databases/create.md
-->
24 changes: 24 additions & 0 deletions content/influxdb3/enterprise/admin/databases/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Delete a database
description: >
Use the [`influxdb3 delete database` command](/influxdb3/enterprise/reference/cli/influxdb3/delete/database/)
to delete a database from {{< product-name >}}.
Provide the name of the database you want to delete.
menu:
influxdb3_enterprise:
parent: Manage databases
weight: 203
list_code_example: |
{{% code-placeholders "DATABASE_NAME" %}}
```sh
influxdb3 delete database DATABASE_NAME
```
{{% /code-placeholders %}}
related:
- /influxdb3/enterprise/reference/cli/influxdb3/delete/database/
source: /shared/influxdb3-admin/databases/delete.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/databases/delete.md
-->
21 changes: 21 additions & 0 deletions content/influxdb3/enterprise/admin/databases/list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: List databases
description: >
Use the [`influxdb3 show databases` command](/influxdb3/enterprise/reference/cli/influxdb3/show/databases/)
to list databases in {{< product-name >}}.
menu:
influxdb3_enterprise:
parent: Manage databases
weight: 202
list_code_example: |
```sh
influxdb3 show databases
```
related:
- /influxdb3/enterprise/reference/cli/influxdb3/show/databases/
source: /shared/influxdb3-admin/databases/list.md
---

<!--
The content of this file is located at content/shared/influxdb3-admin/databases/list.md
-->
2 changes: 1 addition & 1 deletion content/influxdb3/enterprise/visualize-data/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: >
Use visualization tools like Grafana, Superset, and others to visualize time
series data stored in InfluxDB 3 Core.
menu: influxdb3_enterprise
weight: 19
weight: 10
related:
- /influxdb3/enterprise/query-data/
---
Expand Down
5 changes: 5 additions & 0 deletions content/shared/influxdb3-admin/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

The following articles provide information about managing your
{{< product-name >}} resources:

{{< children >}}
103 changes: 103 additions & 0 deletions content/shared/influxdb3-admin/databases/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@

An {{< product-name >}} database is a named location where time series data is
stored. Each database can contain multiple tables.

> [!Note]
> **If coming from InfluxDB v1**, the concepts of databases and retention policies
> have been combined into a single concept--database. Retention policies are no
> longer part of the InfluxDB data model.
> However, {{% product-name %}} does
> support InfluxQL, which requires databases and retention policies.
> See [InfluxQL DBRP naming convention](/influxdb3/version/admin/databases/create/#influxql-dbrp-naming-convention).
>
> **If coming from InfluxDB v2, InfluxDB Cloud (TSM), or InfluxDB Cloud Serverless**,
> _database_ and _bucket_ are synonymous.
<!--
## Retention periods
A database **retention period** is the maximum age of data stored in the database.
The age of data is determined by the timestamp associated with each point.
When a point's timestamp is beyond the retention period (relative to now), the
point is marked for deletion and is removed from the database the next time the
retention enforcement service runs.
The _minimum_ retention period for an InfluxDB database is 1 hour.
The _maximum_ retention period is infinite meaning data does not expire and will
never be removed by the retention enforcement service.
-->

## Database, table, and column limits

{{< product-name >}} places the following limits on databases, tables, and columns:

### Database limit

**Maximum number of databases**: {{% influxdb3/limit "database" %}}

### Table limit

**Maximum number of tables across all databases**: {{% influxdb3/limit "table" %}}

{{< product-name >}} limits the number of tables you can have across _all_
databases to {{% influxdb3/limit "table" %}}. There is no specific limit on how
many tables you can have in an individual database, as long as the total across
all databases is below the limit.

Having more tables affects your {{% product-name %}} installation in the
following ways:

{{< expand-wrapper >}}
{{% expand "**May improve query performance** <em style='opacity:.5;font-weight:normal;'>View more info</em>" %}}

Schemas with many tables that contain
[focused sets of tags and fields](/influxdb3/version/write-data/best-practices/schema-design/#design-for-performance)
can make it easier for the query engine to identify what Parquet files contain
the queried data, resulting in better query performance.

{{% /expand %}}
{{% expand "**More PUTs into object storage** <em style='opacity:.5;font-weight:normal;'>View more info</em>" %}}

When using cloud-based object storage as your data backend, the more tables you
have, the more `PUT` requests there are into your object store as InfluxDB
persists data to Parquet files. Each `PUT` request incurs a monetary cost and
increases the operating cost of {{< product-name >}}.

{{% /expand %}}
{{% expand "**More work for the compactor** _(Enterprise only)_ <em style='opacity:.5;font-weight:normal;'>View more info</em>" %}}

To optimize storage over time, InfluxDB 3 Enterprise has a compactor that
routinely compacts Parquet files.
With more tables and Parquet files to compact, the compactor may need to be scaled
to keep up with demand, adding to the operating cost of InfluxDB 3 Enterprise.

{{% /expand %}}
{{< /expand-wrapper >}}

### Column limit

**Maximum number of columns per table**: {{% influxdb3/limit "column" %}}

Each row must include a time column, with the remaining columns representing
tags and fields.
As a result, a table can have one time column and up to {{% influxdb3/limit "column" -1 %}}
_combined_ field and tag columns.
If you attempt to write to a table and exceed the column limit, the write
request fails and InfluxDB returns an error.

Higher numbers of columns has the following side-effects:

{{< expand-wrapper >}}
{{% expand "May adversely affect system performance" %}}

InfluxData identified {{% influxdb3/limit "column" %}} columns as the safe limit
for maintaining system performance and stability.
Exceeding this threshold can result in
[wide schemas](/influxdb3/version/write-data/best-practices/schema-design/#avoid-wide-schemas),
which can negatively impact performance and resource use,
depending on your queries, the shape of your schema, and data types in the schema.

{{% /expand %}}
{{< /expand-wrapper >}}

{{< children hlevel="h2" readmore=true hr=true >}}
Loading

0 comments on commit ebf9b1b

Please sign in to comment.