Skip to Content

SAP HANA 基础架构简介(三)


Index Server –JoinEngine

  • 当query 包含JOIN or aggregate expressions 时使用
    • e.g. COUNT, MIN, MAX, SUM, AVG, …
  • 在Join Engine 之前, the SQL Layer 创建一个Join View
    • Then the query is executed on the view
  • Join View (≡ Attribute View)
  • Statistics of Join Engine:


Index Server –OLAP Engine

  • OLAP View ≡ Analytical View
  • OLAP Views can be created via SQL command or via the modeler
  • WITH HINT(OLAP_PARALLEL_AGGREGATION) at the end of a query can be used to execute the query on the OLAP Engine
    • A Join View is created in all cases
    • OLAP Engine tries to create an OLAP View and execute the query on it
    • If it’s impossible because the OLAP Engine cannot handle the query, a Join View is used

Index Server –RowStore / ptime

  • 行存储数据
  • 表存在于共享内存段
  • 用于OnLine-Transaction-Processing
    • Response time < 1 msec
    • 简单的 SELECTqueries 比Column Store执行更好
  • 每个内存中的表使用 a linked list of pages (16k each)
    • Pages consist of a header and of slots that contain the table records
    • Memory is not allocated page by page to avoid memory fragmentation
      • Instead segments of 64 MB are allocated
      • A segment is freed only when all it’s pages are empty
  • 无数据压缩
  • 多节点系统中只存在于Master中

Index Server –Column Store / trex

  • 列存储数据
  • 数据存在于Heap (dynamic memory)
  • 使用OnLine-Analytical-Processing
    • Response time < 100 msec
  • 优化复杂的 analytical queries and aggregation
    • Performs comparatively poor for a high number of small SELECTqueries
  • Tables 被分裂到partitions
    • Split is done in a way that each partition contains a different set of rows of the table
    • 只有 Column Store 支持 table splitting
  • 多几点系统表可以分布是存储
  • 数据压缩
    • 目标: 存储更多数据到主存
    • 问题: 写操作到压缩数据会花时间
      • 需要重组存储结构并重新计算压缩
      • 因此写操作并不直接编辑压缩的数据
  • 写入Delta Storage的改变
    • Delta Storage 只存在内存中
    • Only Delta Log entries are written to the Persistence Layer when entries are inserted into the delta storage
    • After a HANA restart the Delta Log entries are replayed to restore the Delta Storage
    • Main part of the data (→ compressed data) is called Main Storage
    • Changes are taken over from Delta Storage to Main Storage asynchronously during Delta Merge


  • 是必要的,因为主内存不够稳定
  • 存储数据到persistent disk volumes
  • Volumes are organized in pages
    • Page sizes between 4k and 16Msupported
  • 提供备份还原功能


  • Application server 允许clients 访问HANA 通过HTTP
    • Allows running JavaScript web applications on HANA server side that can use the DB
  • 可以嵌入Index Server 1849775或作为外部服务
  • 外部XSEngine服务是一个没有表的Index Server
    • All incoming queries are forwarded to the HANA landscape
  • Xsa:<application_name> for application trace

No comments