Parallel Database Query Session State Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database systems face inefficiencies in parallel query execution due to high overhead costs associated with switching context between clients, leading to resource wastage and increased execution times in busy systems.
Innovation Solution
Implementing a system that saves session states for parallelization resources, allowing previously used resources to be reused by identifying matching slaves and session connections, thereby reducing the need for full setup costs each time workload is assigned.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If parallelization resources are shared among multiple clients to improve resource utilization, then resource utilization efficiency is improved, but context switching overhead increases due to setup activities required when switching between clients
Solution Approach 1:
The system performs preliminary actions by saving session state information (including connection details, authentication data, and configuration settings) when a client disconnects. When the same client reconnects, the system retrieves and restores this previously saved state, eliminating the need to perform setup activities again. This preliminary saving of state information resolves the contradiction by maintaining resource sharing benefits while avoiding repeated context switching overhead.
2Reliability
If setup activities are performed completely each time workload is assigned to a parallelization resource, then reliability of session state is improved, but computing resource consumption increases
Solution Approach 1:
The system changes the state parameters by transitioning from a complete setup approach to a selective restoration approach. Instead of re-initializing all session parameters (connection strings, authentication tokens, configuration settings) from scratch, the system identifies and restores only the specific parameters that were previously saved in the session state object. This parameter change strategy maintains reliability by ensuring all necessary session parameters are properly restored while significantly reducing computing resource consumption by avoiding redundant setup operations.
3Loss of time
If session state is saved and reused for parallelization resources, then context switching overhead is reduced, but system complexity increases due to state management requirements
Solution Approach 1:
The system extracts and isolates the session state information into a separate, manageable structure (session state object) that can be independently saved, stored, and restored. By extracting the session state from the main resource management logic and handling it as a distinct entity, the system reduces overall complexity. The session state object encapsulates all necessary connection and configuration information, making state management more organized and less intrusive to the core resource allocation mechanisms.
Data Source
AI summary
Described is an improved approach to implement parallel queries where session states are saved for parallelization resources. When work needs to be performed in the parallel query system for a given session, a search can be performed to identify a resource (from among the pool of available resources) that had previously been used by that session, and which had saved a session state object for that previous connection to the session. Instead of incurring the entirety of setup costs each time workload is assigned to a resource, the saved session state can be used to re-set the context for the resource to the configuration requirements for that session.


