Re: Bad performance of the first resultset.next()

2017-04-20 Thread Ankit Singhal
+1 for Joanthan comment, -- Take multiple jstack of the client during the query time and check which thread is working for long. If you find merge sort is the bottleneck then removing salting and using SERIAL scan will help in the query given above. Ensure that your queries are not causing

Re: Bad performance of the first resultset.next()

2017-04-20 Thread ashish tapdiya
execQuery() is asynchronous and returns immediately. next() has blocking semantics and that is why it waits for the result set to be generated by the server side. On Thu, Apr 20, 2017 at 10:18 AM, Jonathan Leech wrote: > Client merge sort is just merging already sorted

Re: Bad performance of the first resultset.next()

2017-04-20 Thread Jonathan Leech
Client merge sort is just merging already sorted data from the parallel scan. Look into the number of simultaneous queries vs the Phoenix thread pool size and numActiveHandlers in Hbase region servers. Salting might not be helping you. Also try setting the fetch size on the query in JDBC. Make

Bad performance of the first resultset.next()

2017-04-20 Thread Binh Luong
Hi Josh, thank you for your answer. Yes, I am using HDP 2.3.4. You're right, with the newer versions it may improve the performance significantly. However, we are going to have a release shortly, so now it's not possible for an upgrade. But yes, it should happen in the upcoming application

Re: Bad performance of the first resultset.next()

2017-04-20 Thread Binh Luong
Hi Josh, thank you for your answer. Yes, I am using HDP 2.3.4. You're right, with the newer versions it may improve the performance significantly. However, we are going to have a release shortly, so now it's not possible for an upgrade. But yes, it should happen in the upcoming application

Re: Bad performance of the first resultset.next()

2017-04-19 Thread Josh Elser
I'm guessing that you're using a version of HDP? If you're using those versions from Apache, please update as they're dreadfully out of date. What is the DDL of the table you're reading from? Do you have any secondary indexes on this table (if so, on what columns)? What kind of query are you

Bad performance of the first resultset.next()

2017-04-19 Thread Lee
Hi all, currently I am struggling with a performance issue in my Rest API. The API receives loads of requests coming from frontend in parallel, makes SQL queries using Phoenix JDBC driver to fetch data from HBase. For each request, the api makes only 1 query to phoenix/hbase. I find out, that