Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implementation of adaptive fetching (#1707)
* feat: implementation of adaptive fetching Implementation of adaptive fetching logic during process of fetching result set. Change adds three new properties used with adaptive fetching: - adaptiveFetch - use to enable/disable work of adaptive fetching - adaptiveFetchMinimum - use to define minimum size computed during adaptive fetching - adaptiveFetchMaximum - use to define maximum size computed during adaptive fetching Adaptive fetching is used to compute fetch size to fully use size defined by maxResultBuffer. Computing is made by dividing maxResultBuffer size by max row result size noticed so far. Each query have separate adaptive fetch size computed, but same queries have it shared. If adaptive fetch is turned on, first fetch is going to be made with defaultRowFetchSize, next fetching of resultSet will be made with computed adaptive fetch size. If adaptive fetch is turned on during fetching, then first fetching made by ResultSet will be made with defaultRowFetchSize, next will use computed adaptive fetch size. Additionally, resultSet have new method - getLastUsedFetchSize to get fetch size used during last fetching. If adaptive fetching is turned on, then getFetchSize will return lastUsedFetchSize. Property adaptiveFetch need properties defaultRowFetchSize and maxResultBuffer to work. Commit to add: - unit tests for AdaptiveFetchQueryMonitoring class; - some style fixes (removing extra spaces, simpler code in setMaxRowSize method in PGStream class). Commit to add: - integration tests for adaptive fetching process; - change casting to from primitive types to Wrapper classes in AdaptiveFetchQueryMonitoringTest. Change in AdaptiveFetchSizeTest: - is using PreparedStatement during tests now; - added assume to check if preferQueryMode is not Simple; - new method to open connection and creating table to remove code repetitiveness. Commit to add explanation about adaptive fetching process in AdaptiveFetchQueryMonitoring class.
- Loading branch information
Showing
18 changed files
with
2,100 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.