drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jean-claude (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4573) Zero copy LIKE, REGEXP_MATCHES, SUBSTR
Date Sun, 10 Apr 2016 12:27:25 GMT

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

jean-claude commented on DRILL-4573:
------------------------------------

Gains of 25% in execution speed are possible when going over VARCHAR of 36 chars. The gain
will be proportional to the size of the VARCHAR.

You can test the performance gain by creating a simple csv file with one column containing
UUID like this
for i in
{1..1000000}
; do uuidgen; done > /Users/jccote/test.csv
then query using drill
select count(1) from dfs.`/Users/jccote/test.csv` where columns[0] like '0%';
run it multiple times to get a good estimate

> Zero copy LIKE, REGEXP_MATCHES, SUBSTR
> --------------------------------------
>
>                 Key: DRILL-4573
>                 URL: https://issues.apache.org/jira/browse/DRILL-4573
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: jean-claude
>            Priority: Minor
>         Attachments: DRILL-4573.1.patch.txt, DRILL-4573.2.patch.txt
>
>
> All the functions using the java.util.regex.Matcher are currently creating Java string
objects to pass into the matcher.reset().
> However this creates unnecessary copy of the bytes and a Java string object.
> The matcher uses a CharSequence, so instead of making a copy we can create an adapter
from the DrillBuffer to the CharSequence interface.
> Gains of 25% in execution speed are possible when going over VARCHAR of 36 chars. The
gain will be proportional to the size of the VARCHAR.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message