返回首页

gbase数据、南大通用产品文档:GBase8a

更新日期:2024年09月11日

E+308
8
DECIMAL[(M[, D])]
-(1E+M
-1)/(1E+D)
(1E+M -1)/(1E+D)
动态计算
NUMERIC[(M[, D])]
-(1E+M
-1)/(1E+D)
(1E+M -1)/(1E+D)
动态计算

注意

若元数据较多,需增加timeout 时间以避免拷贝元数据时间超时。执行
gcinstall.py 脚本时增加参数--timeout=TIMEOUT,
timeout 时间单位为分钟,
若不指定timeout 时间,默认超时时间为15 分钟。
操作步骤
步骤1:执行安装

GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-04-10)
南大通用数据技术股份有限公司
238
$ ./gcinstall.py --silent=demo.options --timeout=120
*********************************************************************************
Thank you for choosing GBase product!
………………
******************************************************************
Do you accept the above licence agreement ([Y,y]/[N,n])? y
******************************************************************
Welcome to install GBase products
******************************************************************
Environmental Checking on gcluster nodes.
CoordinateHost:
DataHost:

说明
使用hint first_rows 主要是将集群的hint 发到node 上去,也就是说在发给node 的语
句上保留集群的first_rows 这个hint。
使用约束

登录集群时使用-c 和-q 参数

GBase UP 产品手册 5 数据库管理指南
文档版本04(2021-04-21) 南大通用数据技术股份有限公司 718
-c 参数的作用,
让hint,
也就是/*+ … */不会直接被客户端忽略,会发送到server
端。
-q 参数,保证在集群的节点上使hint 可以起作用。

只能对于单表查询时,并且使用了limit 关键字,并且limit 不能包含offset 时,
才能有优化作用。

查询语句中不能包含GROUP BY、ORDER BY、OLAP 函数,不支持UNION,
但支持UNION ALL。
语法格式
SEELCT /*+ first_rows(n1) */ colums FROM table_name LIMIT n;
其中,n1 表示每次最小的返回结果集的请求。
示例
示例:/*+ first_rows(5) */ t1.a
gbase> SELECT /*+ first_rows(5) */ t1.a FROM t1 LIMIT 10;
+------+
| a |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
+------+
10 rows in set