Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-686

JdbcStringBasedCacheStore loads previous data from store before an insert

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.2.0.Final
    • 4.0.0.Final, 4.1.0.Final
    • Loaders and Stores
    • None

      The JdbcStringBasedCacheStore implementation loads the previous data on an insert to find out if it should generate an UPDATE or INSERT statement, while it would perform much better to just verify if the primary key exists.

      On top of this, some databases provide ways to avoid the need to check at all, like MySQL's " INSERT ... ON DUPLICATE KEY UPDATE"
      http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html

            tfromm_jira Thomas Fromm (Inactive)
            sgrinove Sanne Grinovero
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: