You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Taewoo Kim (JIRA)" <ji...@apache.org> on 2017/02/01 18:24:51 UTC

[jira] [Comment Edited] (ASTERIXDB-1779) Processing the certain function predicates after a simple predicates

    [ https://issues.apache.org/jira/browse/ASTERIXDB-1779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15848741#comment-15848741 ] 

Taewoo Kim edited comment on ASTERIXDB-1779 at 2/1/17 6:24 PM:
---------------------------------------------------------------

[~tillw]: Actually, my example is wrong. I need to switch the order in the example. My point is that regardless of orders of the predicates that a user puts, the optimizer needs to reorder them by increasing evaluation cost. I am not sure we have this logic in the current code. Let me check. 

{code}
for $i in dataset MyData
   where edit-distance($i.name, "Arnold") < 2 and $i.id < 5
   return $i;
{code}


was (Author: wangsaeu):
[~tillw]: Actually, my example is wrong. I need to switch the order in the example. My point is that whatever order that a user specifies predicates, the optimizer needs to reorder them by increasing evaluation cost. I am not sure we have this logic in the current code. Let me check. 

{code}
for $i in dataset MyData
   where edit-distance($i.name, "Arnold") < 2 and $i.id < 5
   return $i;
{code}

> Processing the certain function predicates after a simple predicates
> --------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1779
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1779
>             Project: Apache AsterixDB
>          Issue Type: Improvement
>            Reporter: Taewoo Kim
>
> For example, if we have the following AQL query,
> {code}
> for $i in dataset MyData
>    where $i.id < 5 and edit-distance($i.name, "Arnold") < 2
>    return $i;
> {code}
> It may be better to process *$i.id < 5* predicate first and then process *edit-distance($i.name, "Arnold")* predicate since the processing cost of the latter is higher than that of the former.  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)