Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ GeminiDB/ GeminiDB Influx API/ Service Overview/ Usage Specifications and Suggestions

Usage Specifications and Suggestions

Updated on 2024-10-30 GMT+08:00

This section describes the GeminiDB Influx instance specifications and provides suggestions for using GeminiDB Influx from the aspects of naming, TAG, FIELD, and query to solve common problems such as incorrect usage, low efficiency, and difficult maintenance.

Terms and Definition

  • Rule: a convention that must be followed when you use GeminiDB Influx API.
  • Suggestion: a convention that must be considered when you use GeminiDB Influx API.

Description

  • Retention Policy (RP): includes information such as the data retention period and number of backups.
  • Data objects: database, RP, MEASUREMENT, TAG, and FIELD

Naming

  • Rules
    1. The name of a database object must start with a lowercase letter and consist of letters or digits. The length of the name cannot exceed 32 bytes.
    2. The name of a database object contains a maximum of 120 characters in the format of <Database name>.<RP name>.<MEASUREMENT name>.
    3. The name of the database object cannot use the system reserved keyword.

      The system reserved keywords include: ALL,ALTER,ANY,AS,ASC,BEGIN,BY,CREATE,CONTINUOUS,DATABASE,DATABASES,DEFAULT,DELETE,DESC,DESTINATIONS,DIAGNOSTICS,DISTINCT,DROP,DURATION,END,EVERY,EXPLAIN,FIELD,FOR,FROM,GRANT,GRANTS,GROUP,GROUPS,IN,INF,INSERT,INTO,KEY,KEYS,KILL,LIMIT,SHOW,MEASUREMENT,MEASUREMENTS,NAME,OFFSET,ON,ORDER,PASSWORD,POLICY,POLICIES,PRIVILEGES,QUERIES,QUERY,READ,REPLICATION,RESAMPLE,RETENTION,REVOKE,SELECT,SERIES,SET,SHARD,SHARDS,SLIMIT,SOFFSET,STATS,SUBSCRIPTION,SUBSCRIPTIONS,TAG,TO,USER,USERS,VALUES,WHERE,WITH,WRITE,WARM

    4. The name of a database object cannot contain Chinese characters or the following special characters: ["].$,/\0*?~#:|'
    5. The database name cannot be the same as the database name used by systems such as _internal, _kapacitor, _heimdall, _vision and opentsdb.
    6. TAG names cannot be updated or renamed.
  • Suggestions
    1. Shorter TAG names can save more resources because each tag name has an index which is stored in the memory.
    2. The names of TAG KEY and FIELD KEY cannot be the same.

TAG

  • Rules
    1. Fields that use the InfluxQL function (such as MAX, MIN, and COUNT) are stored as FIELDs.
    2. TAG supports only the character string type. If the stored value is not of the character string type, the value is stored as FIELD.
  • Suggestions
    1. TAG can distinguish data better than the MEASUREMENT name does.
    2. Design the TIME precision as required. Lower precision can bring better performance.
    3. The field often used as a search criterion is stored as a TAG.
    4. The field that uses GROUP BY is stored as a TAG.

FIELD

  • Rule: The type of each field must be the same.
  • Suggestion: The number of FIELDs should not be too large. Each FIELD is calculated independently. Too many FIELDs may cause the fuzzy query to fail.

Query

  • Rules
    1. Do not run SELECT * FROM to query data.
    2. The query statement must contain the time range restriction.
    3. Before bringing a service online, perform a load test to measure the performance of the database in peak hours.
  • Suggestions
    1. During the query, select only the fields that need to be returned.
    2. Shorter time range can bring better query performance.
    3. The more accurate the TAG value is, the better the query performance is. Use a single time series for query, that is, specify all TAG values or more TAG values.
    4. Add fill(none) after group by time intervals in queries. The function of fill(none) is that no timestamp or value is returned for an interval without data points. If there is sparse data, the number of returned query results can be greatly reduced.
    5. If nested queries are used, place the filter for querying time range in the outermost query.

DELETE

Suggestion: Do not execute the DELETE statement to delete data. Set a retention period so that data can be automatically deleted.

Others

  • Rule: Select instance specifications based on the service time series scale, number of client connections, and number of retention policies. For details, see Instance Specifications.

    If the database load exceeds the specification limit, unpredictable problems may occur. In severe cases, the database may be unavailable.

  • Suggestion: Use a load balancer address to connect to the database. For details, see Connecting to an Instance Using a Load Balancer Address (Recommended).
  • Note: If cold storage is enabled, cold data cannot be written.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback