1. 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'
  2. 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 ...
  3. Chop up a complex query to many simpler queries.
  4. 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 );
  5. Try to use the temporary table to cache data, which can avoid scan an physical table for times.
  6. Try to push the outer predicate into the inner subquery clause, so that it is evaluated before the analytic computation
  7. For Top-K query, if posible, we'd better omit the order by clause, Or we'd better adding a filter condition for it.
  8. For sort operation, We can create Pre-sorted projections, so the
    vertica can choose the faster Group By Pipeline over Group By Hash
  9. 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的更多相关文章

  1. Goal driven performance optimization

    When your goal is to optimize application performance it is very important to understand what goal d ...

  2. opengl performance optimization

    OpenGL 性能优化 作者: Yang Jian (jyang@cad.zju.edu.cn) 日期: 2009-05-04 本文从硬件体系结构.状态机.光照.纹理.顶点数组.LOD.Cull等方面 ...

  3. Java Performance Optimization Tools and Techniques for Turbocharged Apps--reference

    Java Performance Optimization by: Pierre-Hugues Charbonneau reference:http://refcardz.dzone.com/refc ...

  4. 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 ...

  5. Performance Optimization (2)

    DesktopGood performance is critical to the success of many games. Below are some simple guidelines f ...

  6. Chrome DevTools & performance optimization

    Chrome DevTools & performance ptimization https://www.bing.com https://developers.google.com/web ...

  7. 网站性能优化(website performance optimization)2

    我们先研究下构建渲染树前的几个步骤:也就是DOM和CSSOM,通常这些步骤的效果最差使你的网页呈现速度非常慢,我们是讨论尽可能快的将HTML流式传输给客户端,使浏览器能够开始构建DOM,还有其他注意事 ...

  8. Android Performance Optimization

    1.zipalign 2.ui优化 3.package size 4.RenderScript 5.Resource Shrinking & Code Shrinking 6.java cod ...

  9. 网站性能优化(website performance optimization)

    提高代码运行速度,或许我们从来没有优化这些页面来提高速度 想要开发优秀的网站,你必须了解你的用户,知道他们想要达到什么目的,同时还要明白浏览器的工作原理,从而能够打造快速良好的体验,我最近在PageS ...

随机推荐

  1. 通过api获取句柄控制其他窗体

    很多时候,编写程序模拟鼠标和键盘操作可以方便的实现你需要的功能,而不需要对方程序为你开放接口.比如,操作飞信定时发送短信等.我之前开发过飞信耗子,用的是对飞信协议进行抓包,然后分析协议,进而模拟协议的 ...

  2. 引用HM.Util.Ioc 的时候报错

    引用HM.Util.Ioc 的时候报错 错误:The type name or alias SqlServer could not be resolved. Please check your con ...

  3. 重新理解javascript回调函数

    把函数作为参数传入到另一个函数中.这个函数就是所谓的回调函数 经常遇到这样一种情况,某个项目的A层和B层是由不同的人员协同完成.A层负责功能funA,B层负责funcB.当B层要用到某个模块的数据,于 ...

  4. luoguP3359 改造异或树

    https://www.luogu.org/problemnew/show/P3359 因为 a ^ b ^ b = a,所以我们预处理 1 到所有点的距离,将删边的操作反过来变成加边,对于每一个联通 ...

  5. LVM 认知与扩容操作

    继上次 "Linux系统如何迁移至LVM磁盘"反响不错,近三百的访问量吧.这次想续写点东西,主要讲的是"LVM认知和扩容操作".因为网上大多数不准确,可能作者也 ...

  6. gitlab容器--带https配置

    #2.gitlab 重要目录 /home/maks/gitlab/config /etc/gitlab /home/maks/gitlab/logs /var/log/gitlab /home/mak ...

  7. [LnOI2019]加特林轮盘赌

    Luogu5249 轮流开枪打一个环上的人 , 每次\(p\)的概率打死 , \(p\)始终相同 , 从第\(1\)个人开始 , 求第\(k\)个人成为唯一幸存者的概率 \(19.3.30\) 官方题 ...

  8. 进阶篇:4.2.6)DFMEA故障库的建立与积累

    本章目的:DFMEA故障库的建立与积累. 1.故障库的认知 故障库是一种数据库,只是这个数据库中储存的是故障模式,也就是失效模式. 从前文DFMEA章节的学习中,我们可以知道,DFMEA对不同层级的失 ...

  9. 本地DataGrip连接阿里云MySQL

    1.阿里云上开通MySQL端口 2.MySQL上的设置 1⃣️mysql -uroot -p2⃣️create user 'usrabc'@'%' identified by 'usrabc'; 3. ...

  10. @media响应式布局

    @media可以根据屏幕尺寸调节布局 @media screen and (min-width:100px) and (max-width:200px){ div { color:red; } } 在 ...