[
https://issues.apache.org/jira/browse/IGNITE-5382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16689694#comment-16689694
]
Vladimir Ozerov commented on IGNITE-5382:
-----------------------------------------
Slowdown is caused by calling {{SET SCHEMA}} SQL statement. This is not needed.
Instead, we may simply call {{Connection.setSchema()}} which does the same
avoiding expensive parsing and prepared statement execution. Will be fixed as a
part of IGNITE-10303.
> SQL: frequent switch between schemas cause severe slowdown
> ----------------------------------------------------------
>
> Key: IGNITE-5382
> URL: https://issues.apache.org/jira/browse/IGNITE-5382
> Project: Ignite
> Issue Type: Task
> Components: cache, sql
> Reporter: Vladimir Ozerov
> Priority: Major
> Labels: sql-performance
>
> We have thread-bound cached connection to H2 database which is bound to
> specific schema. See {{IgniteH2Indexing.connectionForThread}}.
> When query with different schema is executed, we call {{SET SCHEMA}} command,
> which is rather expensive and may cause slowdown when queries form different
> caches are executed.
> To avoid this we should maintain thread-local map of such connections. Be
> careful with concurrency and resource leaks.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)