Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
cmutombo2
Contributor
Contributor

Qliksens running sql script endlessly. (Without result, which imposes cancellation)

Hi, Community

I need help : 

When I run an sql script in "Oracle sql Developper" it takes 2 minutes to return result, but same script running in "Qliksens" runs endlessly, without result, which imposes cancellation.

Has anyone experienced this problem? How can it be solved?

thanks in advance.

the sql script : 

select * from

 

(

 

select /*+parallel(8)*/

trunc(oc_recordtimestamp) dates,

to_char (oc_recordtimestamp,'DAY') DAY_,

to_char(oc_recordtimestamp,'hh24') hours,

round(SUM(OC_TOTAL_USED_DURATION)/60,2) as  MINUTES

 from  ods.fct_cc_ccs_cdr_new   t,

       ods.Ref_At_Account_Type        v,

       ods.Ref_Tip_Transaction_Prefix w,

       ods.Ref_Prd_Product,

       insight.f_rt_record_type       y

    

 where f_rt_seqid = rt_seqid(+)

   and ref_at_id = at_id(+)

   and ref_tip_id = tip_id(+)

   and ref_prd_id = prd_id(+)

 

      and oc_recordtimestamp >=trunc(sysdate)

     and rt_common_code in ('VOICE')

and at_id not in ('10946','10903','10947')

 

GROUP BY trunc(oc_recordtimestamp) ,

to_char(oc_recordtimestamp,'hh24') ,

to_char (oc_recordtimestamp,'DAY')

 

 

union all

 

select

DATES,

to_char (dates,'DAY') DAY_,

HOURS,

sum(minutes) as Minutes

from  voice_openet

where DATES>=trunc(sysdate)-30

and charge_type='InB'

and to_char (dates,'DAY')=to_char(sysdate,'DAY')

group by DATES,to_char (dates,'DAY'),

HOURS)

 

Labels (2)
2 Replies
maxgro
MVP
MVP

There are several possible answers, for example different machine and/or different provider; or in sql developer you get only the first lines of the result set; or in Qlik it doesn't consider the hint /*+parallel(8)*/

Some ideas, questions and checks you could try:

Do sql developer and qlik sense run on the same machine?

Do they use the same provider (oledb or odbc or....)?

Try to replace the "select * from" with a select count. Do you get the same execution times?

For the hint: https://community.qlik.com/t5/QlikView-App-Dev/Oracle-SQL-Select-Statement-with-quot-Hint-quot/td-p/...

Check if the execution plan in Qlik and Sql developer is the same

marcus_sommer

Qlik doesn't execute any SQL else transferred the statement per driver to the data-base and gets reversed the result. Therefore the SQL itself is meaningless.

Your issue is caused from the driver and/or the data-base which didn't return any data respectively in your case more important no error. Without getting data or an error Qlik will wait forever unless by QMC tasks which have usually a timeout after n hours.

Therefore take a look in the driver/data-base logs and/or enable there that error-messages are transferred and you will probably get valuable hints to the underlying reasons.