You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An InfluxDB database is a named location where time series data is stored.
@@ -19,11 +27,13 @@ Each InfluxDB database has a [retention period](#retention-periods).
19
27
{{% note %}}
20
28
**If coming from InfluxDB v1**, the concepts of databases and retention policies
21
29
have been combined into a single concept--database. Retention policies are no
22
-
longer part of the InfluxDB data model. However, InfluxDB Cloud Dedicated does
30
+
longer part of the InfluxDB data model.
31
+
However, {{% product-name %}} does
23
32
support InfluxQL, which requires databases and retention policies.
24
33
See [InfluxQL DBRP naming convention](/influxdb/cloud-dedicated/admin/databases/create/#influxql-dbrp-naming-convention).
25
34
26
-
**If coming from InfluxDB v2 or InfluxDB Cloud**, _database_ and _bucket_ are synonymous.
35
+
**If coming from InfluxDB v2, InfluxDB Cloud (TSM), or InfluxDB Cloud Serverless**,
36
+
_database_ and _bucket_ are synonymous.
27
37
{{% /note %}}
28
38
29
39
## Retention periods
@@ -40,9 +50,10 @@ never be removed by the retention enforcement service.
40
50
41
51
## Table and column limits
42
52
43
-
In {{< product-name >}}, table (measurement) and column limits can be
44
-
customized when [creating](#create-a-database) or
45
-
[updating a database](#update-a-database).
53
+
You can customize [table (measurement) limits](#table-limit) and
54
+
[table column limits](#column-limit) when you
55
+
[create](#create-a-database) or
56
+
[update a database](#update-a-database) in {{< product-name >}}.
46
57
47
58
### Table limit
48
59
@@ -60,7 +71,8 @@ cluster in the following ways:
60
71
{{% expand "**May improve query performance** <emstyle='opacity:.5;font-weight:normal;'>View more info</em>" %}}
61
72
62
73
Schemas with many measurements that contain
63
-
[focused sets of tags and fields](/influxdb/cloud-dedicated/write-data/best-practices/schema-design/#design-for-performance) can make it easier for the query engine to
74
+
[focused sets of tags and fields](/influxdb/cloud-dedicated/write-data/best-practices/schema-design/#design-for-performance)
75
+
can make it easier for the query engine to
64
76
identify what partitions contain the queried data, resulting in better
65
77
query performance.
66
78
@@ -72,7 +84,7 @@ data by measurement and time range and stores each partition as a Parquet
72
84
file in your cluster's object store. By increasing the number of measurements
73
85
(tables) you can store in your database, you also increase the potential for
74
86
more `PUT` requests into your object store as InfluxDB creates more partitions.
75
-
Each `PUT` request incurs a monetary cost and will increase the operating cost of
87
+
Each `PUT` request incurs a monetary cost and increases the operating cost of
76
88
your cluster.
77
89
78
90
{{% /expand %}}
@@ -91,20 +103,33 @@ operating cost of your cluster.
91
103
92
104
**Default maximum number of columns**: 250
93
105
94
-
Time, fields, and tags are each represented by a column in a table.
106
+
**Configurable maximum number of columns**: 1000
107
+
108
+
Each row must include a time column, with the remaining columns representing
109
+
tags and fields.
110
+
As a result, a table with 250 columns can have one time column and up to
111
+
249 field and tag columns.
112
+
113
+
If you attempt to write to a table and exceed the column limit, the write
114
+
request fails and InfluxDB returns an error.
115
+
116
+
If you update the column limit for a database, the limit applies to newly
117
+
created tables; doesn't override the column limit for existing tables.
118
+
95
119
Increasing your column limit affects your {{% product-name omit=" Clustered" %}}
Optimize SQL and InfluxQL queries to improve performance and reduce their memory and compute (CPU) requirements.
21
22
Learn how to use observability tools to analyze query execution and view metrics.
22
23
23
24
-[Why is my query slow?](#why-is-my-query-slow)
24
25
-[Strategies for improving query performance](#strategies-for-improving-query-performance)
26
+
-[Query only the data you need](#query-only-the-data-you-need)
25
27
-[Analyze and troubleshoot queries](#analyze-and-troubleshoot-queries)
26
28
27
29
## Why is my query slow?
28
30
29
31
Query performance depends on time range and complexity.
30
32
If a query is slower than you expect, it might be due to the following reasons:
31
33
32
-
- It queries data from a large time range.
34
+
- It queries data from a large time range.
33
35
- It includes intensive operations, such as querying many string values or `ORDER BY` sorting or re-sorting large amounts of data.
34
36
35
37
## Strategies for improving query performance
36
38
37
39
The following design strategies generally improve query performance and resource use:
38
40
39
41
- Follow [schema design best practices](/influxdb/cloud-dedicated/write-data/best-practices/schema-design/) to make querying easier and more performant.
40
-
- Query only the data you need--for example, include a [`WHERE` clause](/influxdb/cloud-dedicated/reference/sql/where/) that filters data by a time range.
41
-
InfluxDB v3 stores data in a Parquet file for each measurement and day, and retrieves files from the Object store to answer a query.
42
-
The smaller the time range in your query, the fewer files InfluxDB needs to retrieve from the Object store.
42
+
-[Query only the data you need](#query-only-the-data-you-need).
43
43
-[Downsample data](/influxdb/cloud-dedicated/process-data/downsample/) to reduce the amount of data you need to query.
44
44
45
45
Some bottlenecks may be out of your control and are the result of a suboptimal execution plan, such as:
@@ -52,9 +52,41 @@ Some bottlenecks may be out of your control and are the result of a suboptimal e
52
52
{{% note %}}
53
53
#### Analyze query plans to view metrics and recognize bottlenecks
54
54
55
-
To view runtime metrics for a query, such as the number of files scanned, use the [`EXPLAIN ANALYZE` keywords](/influxdb/cloud-dedicated/reference/sql/explain/#explain-analyze) and learn how to [analyze a query plan](/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/analyze-query-plan/).
55
+
To view runtime metrics for a query, such as the number of files scanned, use
56
+
the [`EXPLAIN ANALYZE` keywords](/influxdb/cloud-dedicated/reference/sql/explain/#explain-analyze)
57
+
and learn how to [analyze a query plan](/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/analyze-query-plan/).
56
58
{{% /note %}}
57
59
60
+
### Query only the data you need
61
+
62
+
#### Include a WHERE clause
63
+
64
+
InfluxDB v3 stores data in a Parquet file for each partition.
65
+
By default, {{< product-name >}} partitions tables by day, but you can also
66
+
[custom-partition your data](/influxdb/cloud-dedicated/admin/custom-partitions/).
67
+
At query time, InfluxDB retrieves files from the Object store to answer a query.
68
+
To reduce the number of files that a query needs to retrieve from the Object store,
69
+
include a [`WHERE` clause](/influxdb/cloud-dedicated/reference/sql/where/) that
70
+
filters data by a time range or by specific tag values.
71
+
72
+
#### SELECT only columns you need
73
+
74
+
Because InfluxDB v3 is a columnar database, it only processes the columns
75
+
selected in a query, which can mitigate the query performance impact of
||`--retention-period`| Database retention period (default is `0s`, infinite) |
106
-
||`--max-tables`| Maximum tables per database (default is 500, `0` uses default) |
107
-
||`--max-columns`| Maximum columns per table (default is 250, `0` uses default) |
105
+
||`--retention-period`|[Database retention period ](/influxdb/cloud-dedicated/admin/databases/#retention-periods)(default is `0s`, infinite) |
106
+
||`--max-tables`|[Maximum tables per database](/influxdb/cloud-dedicated/admin/databases/#table-limit) (default is 500, `0` uses default) |
107
+
||`--max-columns`|[Maximum columns per table](/influxdb/cloud-dedicated/admin/databases/#column-limit) (default is 250, `0` uses default) |
108
108
||`--template-tag`| Tag to add to partition template (can include multiple of this flag) |
109
109
||`--template-tag-bucket`| Tag and number of buckets to partition tag values into separated by a comma--for example: `tag1,100` (can include multiple of this flag) |
110
110
||`--template-timeformat`| Timestamp format for partition template (default is `%Y-%m-%d`) |
0 commit comments