Hi Siddharth,

It's not clear what inner exception you are getting. Would be nice if you can post the entire stack trace of the exception. Anyway, one of the possible reasons could be insufficient memory error, coz the query is by default executed as a star join which means the latter three tables will be hash cached the same time on the server side. I assume that this is not the optimal choice in your case, for after the where clause being applied on the first table, the result might be considerably small. So you can try using the hint NO_STAR_JOIN by inserting "/* +NO_STAR_JOIN*/" right after "Select".


On Tuesday, November 18, 2014, Siddharth Ubale <siddharth.ubale@syncoms.com> wrote:



The query for which I get this :


select * from "Customers_3" as c

inner join "Address_3" as a on a."A_C_Id" = c."C_Id"

inner join "Orders_3" as o on o."O_C_Id" = c."C_Id"

inner join "Order_Details_3" as od on od."O_No" = o."O_No"

where c."C_Name" = 'Amit500';





From: Siddharth Ubale
Sent: Tuesday, November 18, 2014 5:28 PM
To: user@phoenix.apache.org
Subject: Hi


HI All,


Can anyone explain why we get this error while running joins on many tables in Phoenix :


Error: Encountered exception in sub plan [2] execution. (state=,code=0)



Siddharth Ubale,

Synchronized Communications

#43, Velankani Tech Park, Block No. II,

3rd Floor, Electronic City Phase I,

Bangalore – 560 100

Tel : +91 80 3202 4060

Web: www.syncoms.com




we innovate, plan, execute, and transform the business​