phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siddharth Ubale <>
Subject Difference in response time for Join queries with a hint.( takes a lot of time )
Date Thu, 20 Jul 2017 06:16:02 GMT
Hi ,

I am executing 2 join queries which give the same response.

Query 1: Nested join over 5 tables where . The query uses rowkey "like" statement to narrow
down to the filtered columns. This query in Phoenix sqlline terminal takes 800millisecs to
Query 2: Is a inner join over the same 5 tables with secondary indexes used, it uses the HINT
/*+ USE_SORT_MERGE_JOIN */. This query takes approx. 700millisecs  to execute on sqlline terminal.

When we use JDBC to execute the same above 2 queries .
>Query 1 takes approx. 900 ms to 1000ms to execute and provide results.
>However query2 takes approx. 3 secs to produce the result. And time taken in the query
on further analysis shows that takes bulk of this time. Why is is that the
terminal takes such less time and the JDBC API is taking so much time to execute the query?

Please do let me know if anyone faced this issue and is there any way I can ensure that JDBC
call with inner join query is executed faster.

Siddharth Ubale,

View raw message