You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Abhishek Gupta <ab...@gmail.com> on 2018/06/20 05:55:08 UTC

RVC query's explain plan shows full scan

Hi,

I am trying to use RVC query for pagination on phoenix but in the explain
plan it always shows the plan as 'FULL SCAN' instead of 'RANGE SCAN'. This
is happening for all the versions of phoenix from 4.7.+ to 4.14 (latest).

Following is an example

0: jdbc:phoenix:localhost> explain select domain, sum(issue_assign_count)
from support_metrics where (domain,truncated_time) >=
('test','201801010030') group by domain limit 10;

*+------------------------------------------------------------------------------+-----------------+----------------+--------------+*

*| **                                    PLAN
     ** | **EST_BYTES_READ ** | **EST_ROWS_READ ** | **EST_INFO_TS ** |*

*+------------------------------------------------------------------------------+-----------------+----------------+--------------+*

*| *CLIENT 1-CHUNK PARALLEL 1-WAY FULL SCAN OVER SUPPORT_METRICS
     * | *null           * | *null          * | *null        * |*

*| *    SERVER AGGREGATE INTO ORDERED DISTINCT ROWS BY [DOMAIN] LIMIT 10
GROUPS * | *null           * | *null          * | *null        * |*

*| *CLIENT 10 ROW LIMIT
     * | *null           * | *null          * | *null        * |*

*+------------------------------------------------------------------------------+-----------------+----------------+--------------+*

3 rows selected (0.025 seconds)

0: jdbc:phoenix:localhost> explain select domain, sum(issue_assign_count)
from support_metrics where domain = 'test' and truncated_time >=
'201801010030' group by domain limit 10;

*+-----------------------------------------------------------------------------------------------------+-----------------+----------------+--------------+*

*| **                                               PLAN
                             ** | **EST_BYTES_READ ** | **EST_ROWS_READ **
| **EST_INFO_TS ** |*

*+-----------------------------------------------------------------------------------------------------+-----------------+----------------+--------------+*

*| *CLIENT 1-CHUNK PARALLEL 1-WAY RANGE SCAN OVER SUPPORT_METRICS
['test','201801010030'] - ['test',*] * | *null           * | *null          *
| *null        * |*

*| *    SERVER AGGREGATE INTO ORDERED DISTINCT ROWS BY [DOMAIN] LIMIT 10
GROUPS                        * | *null           * | *null          * | *null
       * |*

*| *CLIENT 10 ROW LIMIT
                           * | *null           * | *null          * | *null
     * |*

*+-----------------------------------------------------------------------------------------------------+-----------------+----------------+--------------+*

Would appreciate any help on this issue.


Thanks,

Abhishek