随笔分类 - vertica
摘要:通过URL设置参数ResultBufferSize,默认是8192(8KB),调大一点,比如:819200(800KB)。 jdbc:vertica://127.0.0.1:5433/mydb?ResultBufferSize=819200 如果设置为0,则表示不限制,Vertica不推荐这种做法。
阅读全文
摘要:Vertica提供了UDx的机制,用来扩展自定义函数,本文演示了在公司项目中的真实案例。 1、编写自定义函数类 自定义函数的Java类,依赖VerticaSDK.jar包,位于服务器上/opt/vertica/bin/VerticaSDK.jar,下载到本地,让项目依赖这个jar包。 然后就可以实现
阅读全文
摘要:出现Clock Skewed如下: Summary: Clock skewed: Status: unresolvedTime of occurrence: 22 Feb 2021 13:15:00Number of occurrences of this message: 1Description
阅读全文
摘要:Vertica集群中一台服务器故障,导致节点DOWN了。 通过admintools图形节点的Restart vertica on Host功能重启节点服务,一直失败。 重新Stop整个数据库,然后再Start,还是不行,其它节点都正常,那个故障节点还是DOWN。查看日志,提示 Data consis
阅读全文
摘要:复杂的SQL可能会导致生成查询计划失败,抛出异常: [Vertica][VJDBC](8617) ERROR: Request size too big [Vertica][VJDBC]Detail: Total allocated memory (MiB) = 1024.004 is about
阅读全文
摘要:with t1 as (select 1 as id union all select 2 union all select 3 union all select 4 union all select 5), t2 as (select '100,200,300' as client_id) sel
阅读全文
摘要:INSERT /*+ direct */ 可以防止WOS full之类的错误,大数据时直接写入ROS. 有时候表join会把内存爆掉,可以加入: /*+set_vertica_options(EE, ENABLE_JOIN_SPILL)*/允许其外部排序.
阅读全文
摘要:【准备】1、CentOS 7.6操作系统2、ext4分区3、vertica-9.3.1-4.x86_64.RHEL64、yum源 三台机器:10.1.125.3910.1.125.4010.1.125.41 【安装过程】 1、安装依赖包[root@localhost ~]# yum install
阅读全文
摘要:select export_objects('/1.sql','test.tabele1');
阅读全文
摘要:COPY schema.table (column1, column2, ...)FROM LOCAL './datafile.txt'WITH DELIMITER AS ',' SKIP 1
阅读全文
摘要:假设有两张表a和b,需要把a的值复制到b表上,一般的做法如下: update b set value=(select a.value from a where a.id=b.id) 在vertica上执行这样的update语句是很慢的,有一个推荐的解决方案,是使用set using 和refresh
阅读全文
摘要:CREATE TABLE t1 ( id int, name varchar(10) ); INSERT INTO t1 SELECT 1 AS id, 'greg' AS name UNION ALL SELECT 2, 'paul' UNION ALL SELECT 3, 'greg' UNIO
阅读全文
摘要:json字符串的内容如下: 如果需要提取出json里的前3个stockName,可以通过regexp_substr函数实现。如下: 语法: 这里是关于regexp_substr函数的官方说明: https://www.vertica.com/docs/8.1.x/HTML/index.htm#Aut
阅读全文
摘要:https://www.vertica.com/kb/Reading-Query-Plans/Content/BestPractices/Reading-Query-Plans.htm
阅读全文
摘要:中位数函数:MEDIAN 使用表达式:MEDIAN ( expression ) OVER ( [ window‑partition‑clause ] ) 准备测试数据: 最简单的用法: 可以按照指定字段分组,显示所在分组的中位数,如下: 官方文档: https://www.vertica.com/
阅读全文
摘要:1、创建用户,并设置密码: create user user1 identified by 'pwd1'; 2、把角色授权给用户(dbduser是普通角色): grant dbduser to user1; 3、把用户模式授权给用户:grant usage on schema schema1 to
阅读全文
摘要:频繁写入vertica,可能导致ROS和WOS错误。如下: java.sql.SQLTransientException: [Vertica][VJDBC](5065) ERROR: Too many ROS containers exist for the following projection
阅读全文
摘要:执行以下语句: alter resource pool general MAXMEMORYSIZE '80%'; 当内存达到80%时,新的任务进去等待状态,直到前面任务执行完毕。
阅读全文
摘要:默认会话数最大值55,如果超过了,就会报如下错误: com.vertica.support.exceptions.NonTransientConnectionException: [Vertica][VJDBC](4060) FATAL: New session rejected due to li
阅读全文
摘要:测试环境的vertica是单节点的,无法做到故障自动恢复,需要手工处理。案例如下: 发现5433端口连接不上,vertica挂了,手工运行admintools,重新启动vertica,仍然失败,提示: *** Starting database: bigdata *** Starting nodes
阅读全文
浙公网安备 33010602011771号