SAP HANA Interview Cheat Sheet (Fast Revision)


1. What is SAP HANA?

An in-memory, columnar, massively parallel processing (MPP) database and application runtime platform.
Used for real-time analytics + real-time transactions (HTAP).


2. SAP HANA Architecture (One-Liners)

  • Index Server – Core engine (SQL, calc engine)
  • Name Server – Metadata & topology
  • Preprocessor Server – Text/linguistic processing
  • XS Engine / XSA – Application server
  • Compile Server – Procedures, calculation engines
  • Statistics Server – Performance monitoring
  • Column Store + Row Store – Mixed OLTP/OLAP storage

3. Key Concepts

  • Columnar Storage → Compression + vector processing
  • In-Memory → Zero I/O latency
  • Delta Merge → Move row-store delta to column-store main
  • Persistence Layer → Savepoints + logs for durability
  • Calculation Engine → Executes calculation views
  • Partitioning → Hash/Range/Round-robin for large tables

4. SAP HANA Modeling

HANA Views

  • Attribute View → Master data (deprecated)
  • Analytic View → Fact + dimension (deprecated)
  • Calculation View → Only recommended modeling object

Calculation View Types

  • Graphical
  • SQL Script based

Node Types

  • Projection
  • Join (Left, Right, Inner, Referential Join)
  • Aggregation
  • Union
  • Rank
  • Star Join

5. SQL Script Essentials

  • Imperative + Declarative SQL
  • Used in Stored Procedures / Table Functions
  • Variables and local tables
  • CE Functions (older syntax)
  • Scalar UDFs and Table UDFs

6. HANA Indexes

  • Main index (column store)
  • Delta index
  • Inverted index (text search)
  • Join indexes created internally

7. Performance Best Practices

  • Push calculations to HANA engine, avoid app-layer work
  • Use column-store tables
  • Avoid unnecessary casting
  • Use referential joins instead of inner joins where possible
  • Enable compression
  • Use variables & input parameters in views
  • Use table partitioning for large tables
  • Avoid SELECT *; specify columns
  • Replace cursors with set operations

8. Data Provisioning Methods

SAP Tools

  • SLT – Real-time replication
  • BODS (Data Services) – ETL
  • SDI (Smart Data Integration) – Replication + virtual tables
  • SDA (Smart Data Access) – Virtual data federation
  • Flat file loads

9. Security (Important for Interviews)

  • Roles: Catalog Roles, HDI Roles
  • Privileges:
    • Object Privileges (SELECT, EXECUTE…)
    • SQL Privileges (INSERT, UPDATE…)
    • System Privileges (USER ADMIN, ROLE ADMIN…)
    • Analytic Privileges (row-level filters)
  • Schema vs HDI containers
  • User vs Technical User

10. Smart Features

  • Full-text search
  • Predictive Analysis Library (PAL)
  • Graph Engine
  • Spatial Engine
  • R & Python Integration
  • HANA ML libraries

11. HANA vs Traditional Databases

FeatureSAP HANATraditional DB
StorageIn-memoryDisk-based
Data ModelColumnarRow-based
SpeedReal-timeSlower due to I/O
ProcessingMPP & vectorizedTraditional CPU
AnalyticsBuilt-inExternal tools needed

12. Common Interview Questions (One-Liners)

  1. What is SAP HANA?
    An in-memory, columnar, high-performance database platform.
  2. Why column store?
    Faster aggregation, compression, vector processing.
  3. What is delta merge?
    Process to merge delta buffer into main store to optimize reads.
  4. What is a calculation view?
    Primary modeling object in HANA for analytical models.
  5. What is the difference between Union and Union All?
    Union removes duplicates; Union All doesn’t.
  6. What is Referential Join?
    Optimized join assuming child records always exist (no PK check).
  7. Difference between Attribute vs Analytic vs Calculation views?
    Attribute/Analytic deprecated; Calculation is the future.
  8. What is SLT?
    Real-time table replication from SAP ECC/S4 to HANA.
  9. What is an Analytic Privilege?
    Row-level security on HANA views.
  10. What is XS Engine vs XSA?
    XS Classic vs Cloud Foundry-based modern runtime.

13. Debugging & Troubleshooting

  • Use PlanViz for query performance
  • Check delta merge status
  • Use M_TABLE_PERSISTENCE_STATISTICS
  • Monitor memory through HANA Studio / Cockpit
  • Identify heavy statements via SQL trace

14. Quick Commands

-- Check running statements SELECT * FROM M_ACTIVE_STATEMENTS; -- Check memory usage SELECT * FROM M_MEMORY; -- Check delta merge statistics SELECT * FROM M_DELTA_MERGE_STATISTICS;


15. 10 Scenario-Based Questions

  1. How to handle slow calculation view performance?
  2. How to debug a view with wrong aggregates?
  3. How to implement row-level security in HANA?
  4. Why partition a table?
  5. How to reduce memory footprint?
  6. How to optimize SLT replication?
  7. Explain Referential vs Left Outer Join.
  8. How to convert a HANA SQL Script procedure to Table Function?
  9. How to analyze a slow SQL query using PlanViz?
  10. How would you design a star-schema in HANA?

I share content relevant to Tech/Interview/Corporate/ & Anything Stuff !!

Do follow for more useful content : https://www.linkedin.com/in/vartika-gupta24/