Today I decided to use the 15 Minutes before my next meeting to write a short freestyle Haiku on joins and unions between Column Store and Row Store tables with SAP HANA. This came to my mind now, because we were internally discussing this with my partners some days ago and also because I used the chance to just test it in the SAP HANA Studio. One never knows what can change with a new HANA Engine implementation version, even if it is not a major one.
Can you JOIN or UNION Column Store and Row Store tables?
Are you sure?
And if yes, how many?
Selects are selects are selects, and Column Store and Row Store approaches are cute and smart internal architecture implementations for In-Memory computing, which are not supposed to affect the capability to select combined business information, or to extract combined reporting data, independently of the technical implementation details and data compression strategies for the database tables in question, right?
So, the answer is…
Yes you can JOIN and UNION Column Store and Row Store tables. You can do it using SQL statements, for example, with the SQL editor in the SAP HANA Studio.
IF (you want to take advantage of the optimization provided by the HANA engines)
/* let’s remember the Join Engine, OLAP Engine and Calculation Engine, which are responsible for Attribute Views, Analytic Views and Column Views, as we discussed a couple of Blogs ago */
THEN (you cannot join Column Store and Row Store tables).
Such SAP HANA Engine driven views are Column Views, and thus they only support combinations of Column Store tables, which makes sense for optimization reasons.
Makes sense to me too, at least for the time being, knowing what I know now…
And now I must rush. An important Skype call is waiting for me.
Co-Founder and COO
P.S. At the end, this did not resemble a Haiku at all… That’s life. The journey is its own reward.