Sunday 12 June 2016

Executed TPC-H Benchmark queries on SAP HANA

I have used TPC-H benchmark(2.17.1) to run some tests on HANA database.Although all of the queries are written in the SQL-92 language, some queries still need to be rectified so that they can be executed on HANA.But the syntax differences don't necessary make SAP HANA SQL92 incompatible as the SQL standard leaves many aspects to the system implementation.

The fourth query ,for example, uses 'interval' to calculate a period of time.

Executed TPC-H Benchmark queries on SAP HANA
But it couldn't be executed on HANA .It seems that HANA SQL doesn't support 'Interval' as a reserved word.

Executed TPC-H Benchmark queries on SAP HANA

So I used the ADD_MONTHS function to replace 'Interval'.

Executed TPC-H Benchmark queries on SAP HANA

Likewise,when I met the queries using 'interval n day' or 'interval n year', I used ADD_DAYS function or ADD_YEARS function to replace the part of queries.

What's more, SAP HANA doesn't support 'AS' to set alias in parentheses.
The 13th query, for instance, couldn't be executed in HANA.

Executed TPC-H Benchmark queries on SAP HANA

So, I rectified it as shown in the following picture and it works.

Executed TPC-H Benchmark queries on SAP HANA

Above information is what I have learned when I used TPC-H benchmark queries in my HANA project.

Source: scn.sap.com

No comments:

Post a Comment