[infinispan-issues] [JBoss JIRA] (ISPN-5649) JDBC cache store upsert support

Gustavo Fernandes (JIRA) issues at jboss.org
Thu Jul 30 05:50:03 EDT 2015


Gustavo Fernandes created ISPN-5649:
---------------------------------------

             Summary: JDBC cache store upsert support
                 Key: ISPN-5649
                 URL: https://issues.jboss.org/browse/ISPN-5649
             Project: Infinispan
          Issue Type: Enhancement
          Components: Loaders and Stores
            Reporter: Gustavo Fernandes


Currently before inserting an entry in the store, a SELECT is issued to find out if the entry already exists, and if so, it does an UPDATE instead of an INSERT.

During data batch loading, those SELECT hurt performance and are not necessary, and even during normal regime, they could be promoted to upserts. The tricky part is, although upserts have been part of SQL standard since 2003, not all DBs support them in the same way [1][2]. So one way of tackling this is to enable support for standard SQL MERGE via configuration, falling back to SELECT+INSERT.

[1] https://en.wikipedia.org/wiki/Merge_%28SQL%29#Other_non-standard_implementations
[2] https://wiki.postgresql.org/wiki/UPSERT#UPSERT_as_implemented_in_practice



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the infinispan-issues mailing list