AWS Redshift typical error and potential root cause:
Full join issue: When use full join, the below join condition should not occur:
1, OR statement
2, an obvious false or true condition, like 1 = 0 or 1=1
3, the datatype of the join column should not be timestamp, this case is very common in pcp join, when use the report date as the join key.
ERROR: 42846: could not convert type "unknown" to numeric because of modifier
When the datatype of a column is supposed to be numeric in a UNION ALL context(basically there are more than three sub query parts),
If there exists NULL value for some sub query, it is needed to cast the NULL value to the numeric datatype.
Error info: [Assert error]
This means the Redshift performance is bad, usually multiple large table join, more CTAS is needed.
Error info: query is automatically killed saying cancelled on user's request
Error info: could not devise a query plan for the given query
The issue is prabably due to there is an join condition in the full join clause. The join column is report_date, which is a date datatype, but there is function applied to report_date, which convert the datatype to timestamp. Unluckily redshift seems not supported this datatype in the join condition.
To solve this issue, we need to cast the join column to date again, like below:
DATEADD(MONTH,-12,CUR.REPORT_DATE) :: DATE = RESULT_PCP.REPORT_DATE ::DATE
Tips: Avoid to use the string concatenation when doing a join, create a temporary table for that particular column.
Redshift related documents
http://docs.aws.amazon.com/redshift/latest/dg/c_Byte_dictionary_encoding.html
http://docs.aws.amazon.com/redshift/latest/dg/welcome.html
https://aws.amazon.com/redshift/pricing/
Sort key testing
Currently test on a table about 10millon rows, no significant difference, Need a larger data set to do the testing.
Previously, the table with sort key is not applied column compression, so this could be an potential reason why there is no significant improvement.
AWS Redshift typical error and potential root cause:的更多相关文章
- mount: error mounting /dev/root on /sysroot as ext3: Invalid argument
/************************************************************************ * mount: error mounting /d ...
- [ERROR] error: error while loading <root>, error in opening zip file error: scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
在家编译一个Apache的开源项目,在编译时遇到错误如下: error: error while loading <root>, error in opening zip file [ER ...
- AWS Redshift summary
https://blogs.aws.amazon.com/bigdata/post/Tx31034QG0G3ED1/Top-10-Performance-Tuning-Techniques-for-A ...
- 亚马逊的PuTTY连接AWS出现network error connection refused,终极解决方案。
使用PuTTY连接AWS的时候,一直出现network error connection refused.百度了这个问题,大家都说是SSH要设置成22.但是我已经设置过了,为什么还是遇到这个问题呢? ...
- AWS EC2实例Linux系统创建root用户并更改为root用户登录
对于刚创建AWS EC2实例,或者经常使用AWS 实例的小伙伴们来说,刚创建的EC2实例是没有ROOT权限的,因此不能直接使用ROOT用户去登陆实例,也无法获取到root权限.一般情况下,EC2实例默 ...
- vue error:The template root requires exactly one element.
error:[vue/valid-template-root] The template root requires exactly one element. 原因: 因为vue的模版中只有能一个根节 ...
- ERROR 1130: Host 'root@localhost' is not allowed to connect to MySQL server
连接mysql时遇到的错误. 原因:该用户没有权限连接访问mysql数据库 解决方法:网站上搜了好多,试了都没有用.最终在登陆的信息页面用root用户登陆时不输入root密码即可.
- aws linux主机root帐号登录
默认情况下,aws主机必须使用pem密码文件并且以ec2-user用户登录系统,之后很多操作都必须用sudo来以root权限执行操作,显得比较麻烦. 以下来自知乎的一个问答,亲测ok ## AWS E ...
- ERROR 1130: Host ’...′ is not allowed to connect to this MySQL server
/******************************************************************** * ERROR 1130: Host ’...′ is no ...
随机推荐
- RabbitMQ&RocketMQ动态添加Queue参考
Kafka重复消费与消息丢失参考: https://www.cnblogs.com/kaleidoscope/p/9763053.html https://blog.csdn.net/qingqing ...
- Endnote X8激活注册信息
使用以下激活信息进行注册: Name:胡萝卜周 Organization:www.carrotchou.blog Product Key:3VHLX-TJJ74-SAM4N-38HEX-KNUCL 来 ...
- Jupyter Notebook插入图片的4种方法
来自:https://blog.csdn.net/qq_33039859/article/details/78507316 方法1:  Markdown ...
- C/C++.【转】解析URL的转义字符百分比(%)字符串
1.来自:[HTTP]_[C_C++]_[解析URL的转义字符百分比字符串] - 猪一戒 - 博客园.html(http://www.cnblogs.com/zhuyijie/p/6465303.ht ...
- Cocos Creator学习四:按钮响应事件
1.方法一:通过编辑器对cc.Button的属性进行拖放操作进行控制 (1)创建脚本BtnClick1.js,增加btnClick1函数,然后拖放到Canvas节点中(记得拖放,否则下面步骤将找不到对 ...
- WingIDE 常用快捷键
Ctrl+N 新建文件 Ctrl+O 打开文件夹 Ctrl+W 关闭当前文件 Ctrl+S 保存文件 Ctrl+shif+S ...
- windows图形图像桌面消失(误删.net组件)
核心模式core 变回完整模式 Full,用dism命令,具体命令如下 dism /online /enable-feature /all /featurename:servercore-fullse ...
- postman(八):使用newman来执行postman脚本
通过之前的了解,我们知道postman是基于javascript语言编写的,而导出的json格式的postman脚本也无法直接在服务器运行,它需要在newman中执行(可以把newman看做postm ...
- 《Java程序设计》win10系统学前准备
<Java程序设计>win10系统学前准备 Git的安装 在https://gitforwindows.org/中下载git for windows,下载完成后进行安装.当安装进行到这一步 ...
- Android 回调函数的理解,实用简单(回调函数其实是为传递数据)
作者: 夏至,欢饮转载,也请保留这段申明 http://blog.csdn.net/u011418943/article/details/60139910 一般我们在不同的应用传递数据,比较方便的是用 ...