Manage databases
An InfluxDB 3 Core database is a named location where time series data is stored. Each database can contain multiple tables.
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, InfluxDB 3 Core does support InfluxQL, which requires databases and retention policies. See 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 not queryable and will be deleted.
By default, data does not expire. When you create a database,
you can optionally set a retention period.
The minimum practical retention period is 1 hour (1h
).
For complete details about retention periods, including duration formats and limitations, see Data retention in InfluxDB 3 Core.
Database, table, and column limits
InfluxDB 3 Core places the following limits on databases, tables, and columns:
Database limit
Maximum number of databases: 5
Table limit
Maximum number of tables across all databases: 2000
InfluxDB 3 Core limits the number of tables you can have across all databases to 2000.
InfluxDB doesn’t limit 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 InfluxDB 3 Core installation in the following ways:
Column limit
Maximum number of columns per table: 500
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 499 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:
Create a database
Use the influxdb3 CLI, HTTP API, or InfluxDB 3 Explorer to create a new database in InfluxDB 3 Core.
# influxdb3 CLI
influxdb3 create database \
--retention-period 30d \
DATABASE_NAME
# HTTP API
curl --request POST "http://localhost:8181/api/v3/configure/database" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer AUTH_TOKEN" \
--data '{
"db": "DATABASE_NAME",
"retention_period": "30d"
}'
List databases
Use the influxdb3 CLI, HTTP API, or InfluxDB 3 Explorer to list databases in InfluxDB 3 Core.
# influxdb3 CLI
influxdb3 show databases
# HTTP API
curl --request GET "http://localhost:8181/api/v3/configure/database" \
--header "Authorization: Bearer AUTH_TOKEN"
Delete a database
Use the influxdb3 CLI, HTTP API, or InfluxDB 3 Explorer to delete a database from InfluxDB 3 Core.
# influxdb3 CLI
influxdb3 delete database DATABASE_NAME
# HTTP API
curl --request DELETE "http://localhost:8181/api/v3/configure/database?db=DATABASE_NAME" \
--header "Authorization: Bearer AUTH_TOKEN"
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB 3 Core and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.