You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Sergey Kalashnikov (JIRA)" <ji...@apache.org> on 2017/10/17 13:51:00 UTC

[jira] [Commented] (IGNITE-6320) SQL: ANTLR performance assessment

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

Sergey Kalashnikov commented on IGNITE-6320:
--------------------------------------------

I've made some benchmarking with parsers generated by ANTLR with MySQL and P/L SQL grammars versus H2 prepared statement.
Also included the ANTLR based parser prototype I created earlier for <IGNITE-6276>.

The measurements for ANTLR parsers were made with two stage parsing strategy (SLL prediction mode).

Here are the results:

||Benchmark||ops/s||
|Complex Query ANTLR/MySQL Grammar|7830,615|
|Complex Query ANTLR/MySQL(Lexer only)|53441,816|
|Complex Query ANTLR/PL-SQL Grammar|3310,900|
|Complex Query H2|25368,322|
|Simple Query ANTLR/MySQL Grammar|28813,159|
|Simple Query ANTLR/PL-SQL Grammar|12581,615|
|Simple Query H2|118872,767|
|Trivial Query ANTLR/MySQL Grammar|120041,528|
|Trivial Query ANTLR/PL-SQL Grammar|63138,856|
|Trivial Query H2|546905,758|
|Drop index ANTLR/MySQL Grammar|350599,019|
|Drop index H2|2373889,332|
|Drop index ANTLR/IgniteProto|474410,677|
|Drop index JFLEX+BYACC/IgniteProto|389347,251|
|Batched Queries 1 Thread ANTLR/MySQL|35,256|
|Batched Queries 2 Threads ANTLR/MySQL|60,010|
|Batched Queries 4 Threads ANTLR/MySQL|95,171|
|Batched Queries 8 Threads ANLR/MySQL|135,311|

It looks like ANTLR parser doesn't scale well enough in multi-threaded environment, although single thread performance is good.



> SQL: ANTLR performance assessment
> ---------------------------------
>
>                 Key: IGNITE-6320
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6320
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>            Reporter: Vladimir Ozerov
>            Assignee: Sergey Kalashnikov
>             Fix For: 2.4
>
>
> Proposed process:
> 1) Download MySQL grammar [1]
> 2) Generate parser
> 3) Measure parsing performance for both simple and complex SQL queries with JMH.
> 4) Analyze the numbers
> [1] https://github.com/antlr/grammars-v4/tree/master/mysql



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)