Updated on 2024-04-22 GMT+08:00

General Guidelines

Database Features

Table 1 Recommended Database Features

Category

Feature

Description

Table type

Hash distributed table

It supports automatic sharding, suitable for tables with a large amount of data (for example, transaction records).

REPLICATE distributed table

It is a common table without sharding, suitable for tables with a small amount of data (for example, the country name table).

Transaction

Distributed transaction (weak consistency)

In GTM free mode, strong consistency is ensured in sharding scenarios, but cross-DN shard read consistency is not ensured. It is recommended that the perfect sharding services be used.

Distributed transaction (strong consistency)

The GTM lite mode ensures cross-DN read and write consistency. It is recommended that non-perfect sharding services be used.

Capacity expansion

On-line smooth expansion

Online services are interrupted for less than 5s. To synchronize logs written during the switchover/failover, the capacity can be scaled up to 100 GB per hour.

Deployment

3 AZs and 3 replicas

You are advised to use the 3-AZ 3-replica deployment by default.

Data type

Integer

TINYINT, SMALLINT, INTEGER, BIGINT

Any precision

NUMERIC/DECIMAL

Floating point

REAL/FLOAT4,DOUBLE PRECISION/FLOAT8,FLOAT

Boolean

BOOLEAN

Fixed-length character

CHAR(n)

Variable-length character

VARCHAR(n),NVARCHAR2(n), TEXT

Time

DATE, TIME, TIMETZ, TIMESTAMP, TIMESTAMPTZ, SMALLDATETIME, INTERVAL, REALTIME

Binary

BYTEA (variable-length binary)

Bit string

BIT(n), VARBIT(n)

Function

Character processing function

String data type processing function

Binary string function

Binary string type processing function

Numeric operation function

Numeric type processing function

Time and date processing function

Time and date type processing function

Index

Primary key or unique index

Single-column or multi-column primary key or unique index

B-tree index

Index type

Features that are not listed include but are not limited to user-defined and UUID data types, and trigger features. If you want to use them, contact GaussDB database technical personnel for evaluation.

Database Indicators

Table 2 Database indicators

Indicator

Recommended Value

Optimal number of shards in a DB instance (number of primary DNs)

< 256

Optimal number of long connections in a DB instance

< 100,000

Maximum data volume on a single DN

2 TB

Optimal number of fields in a single table

< 50

Optimal number of indexes in a table

< 5

Optimal number of composite indexes in a table

< 3

Optimal number of columns in a single composite index

< 5

Optimal width of a single line

< 2,000

Recommended maximum value of a single field

10 MB

Optimal SQL statement length

< 5,000

Information indicating insufficient disk capacity (considering capacity expansion)

45%

Alarm indicating insufficient disk capacity (considering capacity expansion)

55%