Comments (5)
Lucas Ward commented
A new class, SingleKeySqlDrivingQueryInputSource has been added to version control. It is a very simple implementation, that is currently read-forward. Restartability still remains to be implemented. I thrashed back and forth about making the input source, 'heavier', but considering other discussions going on about transaction, etc, I am starting to agree witht the concept of using a 'Transactional Buffer' that could be generic to all input sources. I almost created a 'TransactionalInputSourceWrapper' that would implement this functionality, but decided to leave it out.
from spring-batch.
Robert Kasanicky commented
The new implementation again uses JdbcTemplate to run the sql queries, what means resource allocation and releasing is done in each iteration. It is necessary to move the resource handling out of the loop to achieve reasonable performance.
I think it makes sense to do the same also for repository implementations.
from spring-batch.
Lucas Ward commented
I disagree that the use of JdbcTemplate by default makes it unperformant just because of resource releasing. Regardless of whether or not your use it, the resultset must be released for each 'details query'. You could keep from closing the connection if not using it, but since that's supressed anyway on most data sources that's not an issue either. The biggest difference between this version and the older driving query, performance-wise, is that the older version used a sql query, with the values built into the sql string. (i.e. select from table where id = 5, instead of where id = ?) Since the new version uses prepared statements, the database can now cache the statements, which should result in much greater performance. Although, I will be interested to see the results of performance testing.
from spring-batch.
Lucas Ward commented
Added Restartable to InputSource and marked as fixed. There will likely still be some refactoring, but I will reopen or create a new issue to track in that case.
from spring-batch.
Dave Syer commented
Assume closed as resolved and released
from spring-batch.
Related Issues (20)
- DELETE CASCADE on Foreign Keys HOT 6
- Spring Batch step write_count less than read_count and filter and skip counts are all zero HOT 1
- Incorrect Chunk property value in implementation of ItemWriter write method HOT 3
- 5.1.2 Backported issues HOT 1
- 5.0.6 Backported issues HOT 1
- remote partitioning doesn't work if you're using graalvm
- Access Job Description
- Kotlin data class support for `FlatFileItemReaderBuilder` HOT 4
- Deserialization of JobParameters throws exception
- Default value for ignoreWarnings in JdbcCursorItemReaderBuilder does not align with documentation HOT 1
- JdbcPagingItemReader - When using sortKeys with alias, I think it should paging by column name rather than alias in the select clause.
- MockStatic and MockConstruction not working in spring batch test cases HOT 1
- ListItemWriter<T>::getWrittenItems has bad wildcard return type HOT 1
- Data class support in JdbcCursorItemReaderBuilder & JdbcPagingItemReaderBuilder HOT 2
- Discrepancy in Thread Safety Documentation for AbstractPagingItemReader Subclasses
- Improve Error Messages in JobParametersBuilder methods
- The table field type in the SQL Server database is ntext and synchronized to the Oracle database, resulting in invalid column types in the corresponding NCLOB
- Add static variables to prevent typos in the metadata tables string path HOT 1
- Deprecate the usage of LobHandler HOT 1
- Spring Batch Job Restart: What should be the correct values for chunk and readerPageSize with respect to grid size.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-batch.