Re: Is first query to a table region way slower?

2018-01-30 Thread Pedro Boado
Same behaviour after truncating the table and after updating statistics over the table. Does size explain the higher lag? In the later example the slow table is 100regions and 2billion records. As I'm just querying first value it shouldn't be affected, right? On 30 Jan 2018 00:57, "Mujtaba

Re: Is first query to a table region way slower?

2018-01-29 Thread Mujtaba Chohan
Just to remove one variable, can you repeat the same test after truncating Phoenix Stats table? (either truncate SYSTEM.STATS from HBase shell or use sql: delete from SYSTEM.STATS) On Mon, Jan 29, 2018 at 4:36 PM, Pedro Boado wrote: > Yes there is a rs.next(). > > In fact

Re: Is first query to a table region way slower?

2018-01-29 Thread Pedro Boado
Yes there is a rs.next(). In fact if I run this SELECT * FROM table LIMIT 1 in a loop for four different tables in the same cluster I get relatively consistent response times across iterations, but same pattern if I execute the code over and over again. So basically first call per table is way

Re: Is first query to a table region way slower?

2018-01-28 Thread James Taylor
Did you do an rs.next() on the first query? Sounds related to HConnection establishment. Also, least expensive query is SELECT 1 FROM T LIIMIT 1. Thanks, James On Sun, Jan 28, 2018 at 5:39 PM Pedro Boado wrote: > Hi all, > > I'm running into issues with a java springboot

Is first query to a table region way slower?

2018-01-28 Thread Pedro Boado
Hi all, I'm running into issues with a java springboot app that ends up querying a Phoenix cluster (from out of the cluster) through the non-thin client. Basically this application has a high latency - around 2 to 4 seconds - for the first query per primary key to each region of a table with