cancel
Showing results for 
Search instead for 
Did you mean: 

Difference of performance between table functions and Graphical views

0 Kudos

Hello all.

I'm having a curious performance problem in Hana.

I have a TF with some complicated logic and then a graphical view with just one node pointing to the TF.

So if I make a count(*) to the TF it takes 1 sec, and the same query but over the grafical view takes 30 secs.

Anyone has any explanation for this?

I need the help of some experts like lbreddemann 🙂

Thanks

lbreddemann
Active Contributor
0 Kudos

Hey Juan,

please add a few more details to your question.

  • what HANA version are you using?
  • EXPLAIN PLAN output for both versions of the query.
  • If possible, screenshots of the PlanVIz.
  • If possible, show the code of the table function

Also, is the result of both SELECT COUNT(*) queries the same?

View Entire Topic
lbreddemann
Active Contributor

The attached EXPLAIN PLAN files contain the very same plan; I cannot make out a difference between them.

However, searching for the hint you found in Google led to this blog post How to investigate if Table User-Defined Function is unfolded or not? which points to a possible reason for the difference in runtime performance.

It appears that the graphical model does not get "unfolded" and thus misses out on SQL optimisations that lead to the better == faster plan.

Check the blog post and if that does not give you ideas on how to fix the query performance, I would recommend opening a support case with SAP.