Query performance optimization of Vertica
- Don't fetch any data that you don't need,or don't fetch any columns that you don't need. Because retrieving more data or more columns, which can increase network,I/O,memory and CPU overhead for the server. For example, if you need several columns you can use
AT EPOCH LATEST
SELECT fi.name, fi.InvestmentKey,id.VendorId,id.CUSIP,id.ISIN,id.DomicileCountryId,id.CurrencyId
FROM dbo.FixedIncome fi
INNER JOIN dbo.InvestmentIdDimension id ON id.InvestmentKey = fi.InvestmentKey
WHERE id.InvestmentId = 'B000023K1X'
But do not use:
AT EPOCH LATEST
SELECT fi.*, id.*
FROM dbo.FixedIncome fi
INNER JOIN dbo.InvestmentIdDimension id ON id.InvestmentKey = fi.InvestmentKey
WHERE id.InvestmentId = 'B000023K1X' - To avoid blocking Vertica write process, we alway add the "AT EPOCH
LATEST" for query,which is snapshot read. for example, You can use
AT EPOCH LATEST SELECT ... FROM ...,
But do not use:
SELECT ... FROM ... - Chop up a complex query to many simpler queries.
 - Join decomposition, if posible, Sometimes, Using "In" clause or sub
query clause instead of a complex "JOIN" clause. like this, we can use
AT EPOCH LATEST
SELECT s1.CompanyId, id.InvestmentId, s1.InvestmentKey,id.VendorId,id.CUSIP,id.ISIN,id.DomicileCountryId,id.CurrencyId
FROM ( SELECT CompanyId,InvestmentKey FROM dbo.FixedIncome WHERE CompanyId = '0C00000BDL') s1
INNER JOIN dbo.InvestmentIdDimension id ON id.InvestmentKey = s1.InvestmentKey
WHERE id.VendorId = 101 OR id.VendorId = 102;
But do not use:
AT EPOCH LATEST
SELECT s1.CompanyId, id.InvestmentId, s1.InvestmentKey,id.VendorId,id.CUSIP,id.ISIN,id.DomicileCountryId,id.CurrencyId
FROM dbo.FixedIncome fi
INNER JOIN dbo.InvestmentIdDimension id ON id.InvestmentKey = s1.InvestmentKey
WHERE fi.CompanyId = '0C00000BDL' AND( id.VendorId = 101 OR id.VendorId = 102 ); - Try to use the temporary table to cache data, which can avoid scan an physical table for times.
 - Try to push the outer predicate into the inner subquery clause, so that it is evaluated before the analytic computation
 - For Top-K query, if posible, we'd better omit the order by clause, Or we'd better adding a filter condition for it.
 - For sort operation, We can create Pre-sorted projections, so the
vertica can choose the faster Group By Pipeline over Group By Hash - Please refer to the "Optimizing Query Performance" chapter in
reference manual of vertica, which doc's name is "Communiti Vertica
Community Edition 6.0"
[https://my.vertica.com/docs/CE/6.0.1/HTML/index.htm#12525.htm ] 
Query performance optimization of Vertica的更多相关文章
- Goal driven performance optimization
		
When your goal is to optimize application performance it is very important to understand what goal d ...
 - opengl performance optimization
		
OpenGL 性能优化 作者: Yang Jian (jyang@cad.zju.edu.cn) 日期: 2009-05-04 本文从硬件体系结构.状态机.光照.纹理.顶点数组.LOD.Cull等方面 ...
 - Java Performance Optimization Tools and Techniques for Turbocharged Apps--reference
		
Java Performance Optimization by: Pierre-Hugues Charbonneau reference:http://refcardz.dzone.com/refc ...
 - Development of large-scale site performance optimization method from LiveJournal background
		
A LiveJournal course of development is a project in the 99 years began in the campus, a few people d ...
 - Performance Optimization (2)
		
DesktopGood performance is critical to the success of many games. Below are some simple guidelines f ...
 - Chrome DevTools & performance optimization
		
Chrome DevTools & performance ptimization https://www.bing.com https://developers.google.com/web ...
 - 网站性能优化(website performance optimization)2
		
我们先研究下构建渲染树前的几个步骤:也就是DOM和CSSOM,通常这些步骤的效果最差使你的网页呈现速度非常慢,我们是讨论尽可能快的将HTML流式传输给客户端,使浏览器能够开始构建DOM,还有其他注意事 ...
 - Android Performance Optimization
		
1.zipalign 2.ui优化 3.package size 4.RenderScript 5.Resource Shrinking & Code Shrinking 6.java cod ...
 - 网站性能优化(website performance optimization)
		
提高代码运行速度,或许我们从来没有优化这些页面来提高速度 想要开发优秀的网站,你必须了解你的用户,知道他们想要达到什么目的,同时还要明白浏览器的工作原理,从而能够打造快速良好的体验,我最近在PageS ...
 
随机推荐
- 日志收集系统elk
			
目录 elk简介 官方帮助 rsyslog rsyslog日志采集介绍与使用 综合实验 案例一: 单机ELK部署 案例二. JAVA环境配置,部署 filebeat+Elasticsearch apa ...
 - POJ 1330 Nearest Common Ancestors(lca)
			
POJ 1330 Nearest Common Ancestors A rooted tree is a well-known data structure in computer science a ...
 - PHP 性能优化一
			
PHP性能优化?对于这个问题,我们首先要知道影响PHP的性能的原因是什么? 1.什么情况下会出现PHP性能问题? 1)PHP语法使用 不当(包括某些业务可以使用PHP本身自带的函数来处理) 2)使用P ...
 - jquery源码解析:proxy,access,swap,isArraylike详解
			
jQuery的工具方法,其实就是静态方法,源码里面就是通过extend方法,把这些工具方法添加给jQuery构造函数的. jQuery.extend({ ...... guid: 1, //唯一标识符 ...
 - redis 3.0 集群__安装
			
参考文档 http://redis.io/topics/cluster-tutorial http://redis.io/topics/cluster-spec http://redis.readth ...
 - css样式引入方式,及常用设置标签样式
			
一. 三种样式引入方式 1. 内联式-直接写在div标签中,不推荐用 <div style="color:red;font-size:20px;font-family:'Micro ...
 - Web App三年将取代原生App?
			
从技术角度讲,html5现在是可以获取很多用户的资源,上传提交服务器,与用户进行交互.但是你可以观察一下PC或Mac,web网页发展了这么长时间了,取代了客户端了吗? 对于现在而言,html5虽已可以 ...
 - HEOI2019游记(退役记)
			
少了回程铁路相关信息,有空补 AFO 辣鸡蒟蒻ghj1222顺利地退役了 由于没带手机拍照片,本次坐动车不写运转记录,下次去CTS/APIO应该是坐普速车,应该能带手机拍照,应该会写运转记录 Day ...
 - IntelliJ IDEA 版本控制(svn、git) 修改文件后,所属目录的颜色也变化
			
IntelliJ IDEA 的版本控制默认文件修改了,所属目录的颜色是不会变化,这很不方便.如: 修改方法如下: File --> settings --> version control ...
 - 做point data的切面的时候的注意事项
			
正确的顺序应该是: 先导入cell data,再转换为point data,再做切面.结果如下: 如果这里导入cell data以后先做了切面再转换为point data,结果就是这样的: 很明显中间 ...