You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Jakub Neubauer (JIRA)" <ji...@apache.org> on 2018/10/03 13:25:00 UTC

[jira] [Updated] (METAMODEL-1199) Cache more prepared statements in JdbcUpdateCallback

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

Jakub Neubauer updated METAMODEL-1199:
--------------------------------------
    Description: 
Currently, JdbcUpdateCallback caches exactly one prepared statement. When the UpdateScript executes different statements, the cached statement is always closed and new one is cached.

Using bigger cache would make it more performant in some scenarios.

Sometimes it is not possible to cumulate all kinds of statements together in the transaction. Especially when combining inserts - updates - selects. Example:
 # INSERT INTO A values(?)
 # UPDATE A set col_a=? WHERE col_b=?
 # INSERT INTO A values(?)
 # UPDATE A set col_a=? WHERE col_b=?
 # INSERT INTO A values(?)
 # UPDATE A set col_a=? WHERE col_b=?
 # etc....

  was:
Currently, JdbcUpdateCallback caches exactly one prepared statement. When the UpdateScript executes different statements, the cached statement is always closed and new one is cached.

Using bigger cache would make it more performant in some scenarios.

Sometimes it is not possible to cumulate all kinds of statements together in the transaction. Especially when combining inserts - updates - selects.


> Cache more prepared statements in JdbcUpdateCallback
> ----------------------------------------------------
>
>                 Key: METAMODEL-1199
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-1199
>             Project: Apache MetaModel
>          Issue Type: Improvement
>            Reporter: Jakub Neubauer
>            Priority: Major
>
> Currently, JdbcUpdateCallback caches exactly one prepared statement. When the UpdateScript executes different statements, the cached statement is always closed and new one is cached.
> Using bigger cache would make it more performant in some scenarios.
> Sometimes it is not possible to cumulate all kinds of statements together in the transaction. Especially when combining inserts - updates - selects. Example:
>  # INSERT INTO A values(?)
>  # UPDATE A set col_a=? WHERE col_b=?
>  # INSERT INTO A values(?)
>  # UPDATE A set col_a=? WHERE col_b=?
>  # INSERT INTO A values(?)
>  # UPDATE A set col_a=? WHERE col_b=?
>  # etc....



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)