high client cpu usage

2016-08-24 Thread Aaron Molitor
Seeing higher than expected CPU/MEM usage for the java process started by the sqlline.py client. From top: top - 14:37:32 up 7 days, 22:15, 2 users, load average: 25.52, 9.74, 7.89 Tasks: 509 total, 1 running, 508 sleeping, 0 stopped, 0 zombie Cpu(s): 61.2%us, 6.3%sy, 0.0%ni, 31.0%id,

Re: high client cpu usage

2016-08-25 Thread John Leach
Can anyone explain why the client would be burning so much CPU and memory if the result is a single row? I suspect we configured something wrong on Phoenix but we are having a hard time figuring it out. Thanks in advance. Regards, John > On Aug 24, 2016, at 9:54 AM, Aaron Molitor wrote:

Re: high client cpu usage

2016-08-25 Thread James Taylor
The client typically does a merge sort when combining results from paralllel scans. Not sure if this would explain the CPU/memory usage you're seeing. Can you narrow it down to a particular query that's causing the issue? Thanks, James On Thu, Aug 25, 2016 at 6:49 AM, John Leach wrote: > Can an

Re: high client cpu usage

2016-08-25 Thread John Leach
Yeah, this query. QUERY: SELECT SUM(L_EXTENDEDPRICE) / 7.0 AS AVG_YEARLY FROM TPCH.LINEITEM, TPCH.PART WHERE P_PARTKEY = L_PARTKEY AND P_BRAND = 'BRAND#23' AND P_CONTAINER = 'MED BOX' AND L_QUANTITY < ( SELECT 0.2 * AVG(L_QUANTITY) FROM TPCH.LINEITEM WHERE L_PARTKEY = P_PA

Re: high client cpu usage

2016-08-25 Thread Maryann Xue
Hi John, Would you mind sharing the query plan for this query (by running "EXPLAIN ")? Thanks, Maryann On Thu, Aug 25, 2016 at 11:19 AM, John Leach wrote: > Yeah, this query. > > QUERY: > SELECT SUM(L_EXTENDEDPRICE) / 7.0 AS AVG_YEARLY > FROM > TPCH.LINEITEM, > TPCH.PART > WHERE > P_PARTKE

Re: high client cpu usage

2016-08-25 Thread Aaron Molitor
1/1 EXPLAIN SELECT SUM(L_EXTENDEDPRICE) / 7.0 AS AVG_YEARLY FROM TPCH.LINEITEM, TPCH.PART WHERE P_PARTKEY = L_PARTKEY AND P_BRAND = 'BRAND#23' AND P_CONTAINER = 'MED BOX' AND L_QUANTITY < ( SELECT 0.2 * AVG(L_QUANTITY) FROM TPCH.LINEITEM WHERE L_PARTKEY = P_PARTKEY ) ; +