Re: phoenix query execution plan

2018-01-18 Thread James Taylor
This is a limitation of our optimizer (see PHOENIX-627). Patches are
welcome. The fix would be isolated to WhereOptimizer.java.

Thanks,
James

On Thu, Jan 18, 2018 at 9:46 AM, abhi1 kumar  wrote:

> Hi All,
>
> I am using phoenix 4.7(hbase 1.1.xx) and came across following case of
> query plans :
>
> Table Schema:
> ---
> PK for table is composed of three cols C1+C2+C3 and there are some
> additional columns as well.
>
> 1. query plan for below select query shows skip scan:
>
>  > select * from table where (C1, C2) in ((x1, y1),(x2,y2))
>
> 2.  however, for below query it prefers server side filters :
>
>  > select * from table where ((C1 = x1 and C2=y1) or (C1 = x2 and
> C2=y2))
>
> Now, i was expecting the both to have similar plan with skip/range scan
> but it seems to be different
> based on used query syntax.I tried using skip scan hint but no luck.
>
> Is there any other way we can enforce  skip/range scan on 2nd queries
> because condition list could
> be really large and doing server side filter based query plan is
> inefficient compared to skip/range scan plan ?
>
> Thanks & Regards,
> Abhi
>


phoenix query execution plan

2018-01-18 Thread abhi1 kumar
Hi All,
I am using phoenix 4.7(hbase 1.1.xx) and came across following case of query 
plans :
Table Schema:---PK for table is composed of three cols C1+C2+C3 
and there are some additional columns as well.       1. query plan for below 
select query shows skip scan:                    > select * from table where 
(C1, C2) in ((x1, y1),(x2,y2))         2.  however, for below query it prefers 
server side filters :
         > select * from table where ((C1 = x1 and C2=y1) or (C1 = x2 and 
C2=y2))    Now, i was expecting the both to have similar plan with skip/range 
scan but it seems to be differentbased on used query syntax.I tried using skip 
scan hint but no luck. 
Is there any other way we can enforce  skip/range scan on 2nd queries because 
condition list couldbe really large and doing server side filter based query 
plan is inefficient compared to skip/range scan plan ?
Thanks & Regards,Abhi