Distributed Database Query Splitting Across Slave Databases
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing non-distributed databases with a master-slave architecture fail to utilize standby slave databases effectively for complex queries, leading to slow query response times and inefficiency due to high load on individual slave databases.
Innovation Solution
A database system that splits query requests into non-overlapping query operations and distributes them across multiple slave databases, utilizing query processing units to execute these operations and integrate results.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a single slave database executes complex SQL query operations, then the query can be processed, but the query response time increases and system overload may occur
Solution Approach 1:
The patent divides a complex SQL query into multiple sub-queries with non-overlapping data ranges, distributing them across multiple slave databases. Each slave database executes only its assigned sub-query, reducing individual load and enabling parallel processing, thus decreasing overall query response time while maintaining processing capability.
2Productivity
If standby slave databases are used for complex queries, then query load is shared, but existing architectures cannot effectively utilize standby resources due to execution constraints
Solution Approach 1:
The patent enables any slave database (including standby databases) to execute query operations by removing execution restrictions. The query processing unit can route sub-queries to any available slave database based on load distribution, making standby databases fully functional for query processing and improving resource utilization flexibility.
3Productivity
If query operations are executed on multiple slave databases, then resource utilization improves, but the system complexity increases due to query splitting and result integration
Solution Approach 1:
The patent introduces a query processing unit as an intermediary component that handles query splitting into sub-queries with non-overlapping ranges and integrates results from multiple slave databases. This dedicated intermediary simplifies the overall architecture by centralizing the complexity of query distribution and result aggregation, while enabling efficient multi-database resource utilization.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A database system as well as a method and an apparatus for querying a database are disclosed herein. In one embodiment, a system comprises a master database, at least one slave database, and a query processing unit. The master database has a data connection with the slave database, and the slave database has a data connection with the query processing unit. The query processing unit is configured to split a query request into query operation instructions having non-overlapping query ranges, send the split query operation instructions to the same or different slave databases to perform the query operations, and return the query results. The disclosed embodiments improve query efficiency.