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
| Feature | SAP HANA | Traditional DB |
|---|---|---|
| Storage | In-memory | Disk-based |
| Data Model | Columnar | Row-based |
| Speed | Real-time | Slower due to I/O |
| Processing | MPP & vectorized | Traditional CPU |
| Analytics | Built-in | External tools needed |
12. Common Interview Questions (One-Liners)
- What is SAP HANA?
An in-memory, columnar, high-performance database platform. - Why column store?
Faster aggregation, compression, vector processing. - What is delta merge?
Process to merge delta buffer into main store to optimize reads. - What is a calculation view?
Primary modeling object in HANA for analytical models. - What is the difference between Union and Union All?
Union removes duplicates; Union All doesn’t. - What is Referential Join?
Optimized join assuming child records always exist (no PK check). - Difference between Attribute vs Analytic vs Calculation views?
Attribute/Analytic deprecated; Calculation is the future. - What is SLT?
Real-time table replication from SAP ECC/S4 to HANA. - What is an Analytic Privilege?
Row-level security on HANA views. - 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
- How to handle slow calculation view performance?
- How to debug a view with wrong aggregates?
- How to implement row-level security in HANA?
- Why partition a table?
- How to reduce memory footprint?
- How to optimize SLT replication?
- Explain Referential vs Left Outer Join.
- How to convert a HANA SQL Script procedure to Table Function?
- How to analyze a slow SQL query using PlanViz?
- 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/