cancel
Showing results for 
Search instead for 
Did you mean: 

Huge difference in Execution time in same Query with different Parameter

satrajit_chatterjee
Participant
0 Kudos

Hi Experts,

We are facing an unique problem once we are executing the query in HANA SQL prompt. This Query was generated from BObj and executing in HANA system. Once this query running with following condition, it is taking almost 7-00 minute to execute and returning around 924 rows.

<< WHERE

  (

Table__1."LOGSYS"  IN  ('RKGCLNT102')

AND

Table__1."CompanyCode"  IN  ('7240','7245')

AND

Table__1."Plant"  IN ……………… >

However if we run the same query with some different plant, It is taking only 2 second. Please find the Query here.

<< WHERE

  (

Table__1."LOGSYS"  IN  ('RKGCLNT102')

AND

Table__1."CompanyCode"  IN  ('7245','7600')

AND

Table__1."Plant"  IN ……………… >

This is really an unexpected behavior and we are not able to get the actual reason why it is behaving like this.

Could anyone please help to analyze this issue to fine the root cause.

Thanks in Advance.

Regards

Satrajit.

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Hi there

Unfortunately you provided too few information to analyze the issue.

Maybe the underlying tables have very skew data and the first select has to read a larger share of the base tables.

Maybe the columns had been unloaded before and the first query had to load them into memory first.

Is the runtime always bad with the one and always good with the other set of parameters?

Have you checked the PlanViz for both versions? How do these differ?

- Lars