Adding heuristic based batch_mem_size allocation #1300
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request enhances the
LogicalGetToSeqScan
rule by introducing a heuristic-based approach for setting thebatch_mem_size
parameter. The focus of this update is not to resolve a specific issue but to optimize the calculation ofbatch_mem_size
using intelligent heuristics.Changes Made:
Heuristics Implementation: Implemented a heuristic-based calculation for the
batch_mem_size
parameter within theLogicalGetToSeqScan
rule. The new approach intelligently determines the batch size by considering both system memory availability and the length of the target list. This dynamic calculation ensures efficient utilization of system resources during batch processing.Code Modification: Modified the apply method in the
LogicalGetToSeqScan
rule to seamlessly incorporate the heuristic-based calculation. The method now utilizes the calculatedbatch_mem_size
for further processing, optimizing the rule's behavior under various conditions.Error Handling: The introduced heuristic-based approach enhances the robustness of the code. By dynamically adjusting the
batch_mem_size
parameter, the code adapts to different scenarios, providing a stable and reliable solution for batch-processing tasks.