cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (Jira)" <j...@apache.org>
Subject [jira] [Closed] (CAY-2650) Support using generated primary keys along with batch inserts
Date Wed, 13 May 2020 13:12:00 GMT

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

Nikita Timofeev closed CAY-2650.
--------------------------------
    Resolution: Fixed

> Support using generated primary keys along with batch inserts
> -------------------------------------------------------------
>
>                 Key: CAY-2650
>                 URL: https://issues.apache.org/jira/browse/CAY-2650
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>            Reporter: John Huss
>            Assignee: John Huss
>            Priority: Minor
>             Fix For: 4.2.M1
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Currently, using generated PKs explicitly prevents multiple inserts from using a batch-bind
insert. This is unhelpful since switching to generated PKs could potentially cause a performance
decrease for certain use cases because of the lack of batch insert functionality.
> This is prohibited by the existing BatchAction:
> {code:java}
> if (runningAsBatch && !generatesKeys) {
> 	runAsBatch(connection, translator, observer);
> } else {
> 	runAsIndividualQueries(connection, translator, observer, generatesKeys);
> }{code}
> Having done very brief performance testing against PostgreSQL, the performance difference
turns out to be minimal for a realistic production scenario, but even so, this is a restriction
worth removing I think.
> I have a pull request coming for this.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message