[
https://issues.apache.org/jira/browse/IGNITE-22480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Iurii Gerzhedovich updated IGNITE-22480:
----------------------------------------
Description:
Execution multistatement contains a big amount of INSERT statements take to
much time. For example, world.sql from AI2 contains about 5k insert statements
that took more than 2 minutes on my local machine. However, if the
multistatement rewrite to a few inserts contains multi values (e.g. insert into
t(a,b) values(1,2) values (2,3) values.....) then it took just a few seconds.
The fast check shows that most of the time consuptions by expression
compilation.
We have a few options for how it could be resolved:
1. Use expression interpretation for simple cases instead of compilation to
java class.
2. Dynamically rewrite such inserts to prepared statements.
3. On AST level extract values (it will work just for literals) and create
tuple for inserting by hands.
Options ordered by the hardness of implementation. Let's start from 3rd, as the
simplest to implement, and check how it will work.
was:
Execution multistatement contains a big amount of INSERT statements take to
much time. For example, world.sql from AI2 contains about 5k insert statements
that took more than 2 minutes on my local machine. However, if the
multistatement rewrite to a few inserts contains multi values (e.g. insert into
t(a,b) values(1,2) values (2,3) values.....) then it took just a few seconds.
The fast check shows that most of the time consuptions by expression
compilation.
We have a few options for how it could be resolved:
1. Use expression interpretation for simple cases instead of compilation to
java class.
2. Dynamically rewrite such inserts to prepared statements.
3. On AST level extract values (it will work just for literals) and create
tuple for inserting by hands.
Options placed by the hardness of implementation. Let's start from 3rd, as the
simplest to implement, and check how it will work.
> Sql. Optimize performance of multistatement with simple inserts
> ---------------------------------------------------------------
>
> Key: IGNITE-22480
> URL: https://issues.apache.org/jira/browse/IGNITE-22480
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Iurii Gerzhedovich
> Priority: Major
>
> Execution multistatement contains a big amount of INSERT statements take to
> much time. For example, world.sql from AI2 contains about 5k insert
> statements that took more than 2 minutes on my local machine. However, if the
> multistatement rewrite to a few inserts contains multi values (e.g. insert
> into t(a,b) values(1,2) values (2,3) values.....) then it took just a few
> seconds.
> The fast check shows that most of the time consuptions by expression
> compilation.
> We have a few options for how it could be resolved:
> 1. Use expression interpretation for simple cases instead of compilation to
> java class.
> 2. Dynamically rewrite such inserts to prepared statements.
> 3. On AST level extract values (it will work just for literals) and create
> tuple for inserting by hands.
> Options ordered by the hardness of implementation. Let's start from 3rd, as
> the simplest to implement, and check how it will work.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)