返回首页

gbase数据、南大通用产品文档:GBase8a数据有序入库

更新日期:2024年09月11日

1.
有序数据入库的性能优势:

提升智能索引对DC 命中率

大幅度提升查询性能
2.
局部范围排序
数据库使用中,定期的增量数据入库,在每次增量数据批量入库前先对批量
数据做排序后入库,使数据库数据在局部范围内有序,提高读取速度。

示例:
建立日表、月表,日表数据进月表前排序,当月结束时全月数据排序。
a)
分析SQL 找出表内主要查询过滤字段(1 个字段);
b)
将表内数据按照选出的过滤字段进行排序。
3.
排序方式:

外部排序:使用排序工具(psort)对数据文件进行排序,排序后使用加载工
具加载至表内;

库内排序:创建临时表,将未排序的数据先存储进临时表,再通过insert into
select * … order by XXX 方式将临时表内数据排序后插入正式表。
注意

外部排序后,加载入库时依然可能会造成数据顺序打乱,所以推荐
使用库内排序。
4.
排序方式适应场景:

外部排序适合非实时加载的业务

库内排序适合实时加载业务

GBase 8a MPP Cluster 产品手册
5 数据库管理指南
文档版本953(2022-04-10)
南大通用数据技术股份有限公司
1328

功能
控制在做rebalance 时,
如果有drop table 是否更新gclusterdb.rebalancing_status 表。
参数取值含义说明

参数值为0:不更新。

参数值为1:更新。
表6- 31 参数值范围说明表
默认值
最小值
最大值
1
0
1

示例
使用gs_install 脚本进行GBase 8c 安装。
gs_install -X /opt/software/gbase/clusterconfig.xml
Parsing the configuration file.
Check preinstall on every node.
Successfully checked preinstall on every node.
Creating the backup directory.
Successfully created the backup directory.
begin deploy..
Installing the cluster.
begin prepare Install Cluster..
Checking the installation environment on all nodes.
begin install Cluster..
Installing applications on all nodes.
Successfully installed APP.
begin init Instance..
encrypt cipher and rand files for database.
Please enter password for database:
Please repeat for database:
begin to create CA cert files
The sslcert will be generated in /opt/gbase/cluster/app/share/sslcert/om
Cluster installation is completed.
Configuring.
Deleting instances from all nodes.

GBase 8c 工具参考手册
南大通用数据技术股份有限公司
227
Successfully deleted instances from all nodes.
Checking node configuration on all nodes.
Initializing instances on all nodes.
Updating instance configuration on all nodes.
Check consistence of memCheck and coresCheck on DN nodes.
Successful check consistence of memCheck and coresCheck on all nodes.
Configuring pg_hba on all nodes.
Configuration is completed.
Successfully started cluster.
Successfully installed application.