phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chinmay Kulkarni (Jira)" <j...@apache.org>
Subject [jira] [Closed] (PHOENIX-5491) Improve performance of InListExpression.hashCode
Date Sat, 21 Dec 2019 00:57:09 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-5491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chinmay Kulkarni closed PHOENIX-5491.
-------------------------------------

Bulk closing Jiras for the 4.15.0 release.

> Improve performance of InListExpression.hashCode
> ------------------------------------------------
>
>                 Key: PHOENIX-5491
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5491
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 5.0.0, 4.14.3
>            Reporter: Chen Feng
>            Assignee: Chen Feng
>            Priority: Minor
>             Fix For: 4.15.0, 5.1.0
>
>         Attachments: PHOENIX-5491-v2.patch, PHOENIX-5491.patch
>
>
> WhereOptimizer runs very slow in parsing sql like "where A in (a1, a2, ..., a_N) and
B = X" when N is very large. In our environment, it runs > 90s for N = 140000.
> This is because for the same instance of InListExpression, InListExpression.hashCode()
is calculate every time, where InListExpression.values is traversed.
> In previous sql, InListExpression.hashCode() will be called N times, and InListExpression.values
has N elements. Therefore the total complexity is N^2.
> Saving the hashCode of InListExpression can reduce the complexity to N. The test shows
the large sql can be finished within 5 seconds.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message