You can translate the question and the replies:

A subquery is not delegated to the source and facing a timeout

In this, 1. the subquery is not delegated to the source because it is executed from dual(). 2. when we execute this full query, it is loading more than 2ml records first (Reason for query timeout) and then it applies the subquery logic in where condition. So, the question is, is there anyway to get executed the sub query first and then the main query applies filter? Is there any other logic to help here? Consumer application is Tableau and if any solution to consumer app will also appriciated? select * from dw_vdb.cib360_bv_daily where as_of_date in (select case getdayofweek(current_date) when 3 then addday(current_date, -4) when 2 then addday(current_date, -3) else addday(current_Date, -2) end) Need exact solution for this use case. Appriciated for your help
22-07-2021 10:42:55 -0400

1 Answer

Hi, I think the Community Q&A has a question similar to this one. To get clarification on this topic, please look at the response to [Q: Passing case statement as subquery in select statement.]( Hope this helps!
Denodo Team
22-07-2021 18:31:52 -0400
You must sign in to add an answer. If you do not have an account, you can register here