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 execute.
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 resultset.next() 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.

Thanks,
Siddharth Ubale,


Reply via email to