docs(outputs.postgresql): Add example to create index for tag columns (#15322)

This commit is contained in:
Thomas Casteleyn 2024-05-08 18:23:53 +02:00 committed by GitHub
parent a3b105e88e
commit 43c8db95d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 0 deletions

View File

@ -274,6 +274,17 @@ tag_table_add_column_templates = [
]
```
#### Index
Create an index on time and tag columns for faster querying of data.
```toml
create_templates = [
'''CREATE TABLE {{ .table }} ({{ .columns }})''',
'''CREATE INDEX ON {{ .table }} USING btree({{ .columns.Keys.Identifiers | join "," }})'''
]
```
## Error handling
When the plugin encounters an error writing to the database, it attempts to