Historical Query Partitioning for Multi-Dimension Data Tables
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data query systems face performance degradation due to the need for re-partitioning large-scale data tables when users switch data dimensions, leading to prolonged running times and disk pressure.
Innovation Solution
A method and apparatus that parse historical query statements to determine a target data dimension, partitioning the data table accordingly, allowing direct query processing in pre-defined partitions without re-partitioning.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If the data table is partitioned based on a specific data dimension to improve query performance, then query processing speed is improved, but re-partitioning is required when users switch data dimensions, leading to prolonged running time and disk pressure
Solution Approach 1:
The system performs preliminary partitioning of the data table based on historical query statements and frequently accessed data dimensions before actual queries are executed. By pre-partitioning the data according to anticipated query patterns, the system eliminates the need for time-consuming re-partitioning operations when users switch between different data dimensions, thus resolving the contradiction between initial query speed and re-partitioning time loss
Solution Approach 2:
The system dynamically adjusts the partitioning strategy by monitoring user query patterns and automatically updating the partitioning scheme to match current query requirements. This dynamic adaptation allows the system to maintain optimal query performance across different data dimensions without manual intervention or costly re-partitioning operations, effectively balancing query speed with adaptability
2Adaptability or versatility
If the data table is re-partitioned based on a new data dimension, then query flexibility is improved, but disk pressure and running time increase significantly
Solution Approach 1:
The system performs preliminary partitioning of the data table based on historical query statements and frequently accessed data dimensions before actual queries are executed. By pre-partitioning the data according to anticipated query patterns, the system eliminates the need for time-consuming re-partitioning operations when users switch between different data dimensions, thus resolving the contradiction between initial query speed and re-partitioning time loss
Solution Approach 2:
The system creates a universal partitioning structure that can serve multiple query dimensions simultaneously. By organizing data partitions in a way that accommodates various query patterns and dimensions, the system maintains query flexibility across different data dimensions without requiring separate re-partitioning operations for each dimension, thereby reducing disk pressure while preserving adaptability
3Adaptability or versatility
If the data table is re-partitioned based on a new data dimension, then query flexibility is improved, but running time increases due to the re-partitioning process
Solution Approach 1:
The system performs preliminary partitioning of the data table based on historical query statements and frequently accessed data dimensions before actual queries are executed. By pre-partitioning the data according to anticipated query patterns, the system eliminates the need for time-consuming re-partitioning operations when users switch between different data dimensions, thus resolving the contradiction between initial query speed and re-partitioning time loss
Solution Approach 2:
The system dynamically adjusts the partitioning strategy by monitoring user query patterns and automatically updating the partitioning scheme to match current query requirements. This dynamic adaptation allows the system to maintain optimal query performance across different data dimensions without manual intervention or costly re-partitioning operations, effectively balancing query speed with adaptability
Data Source
AI summary
The present specification provides a data query method and a related device. The method includes: parsing a historical query statement for a target data table, to obtain at least one data dimension included in a query condition in the historical query statement; determining a target data dimension from the at least one data dimension, and performing partitioning processing on the target data table based on the target data dimension, to divide the target data table into a plurality of data partitions; and obtaining a to-be-executed target query statement, and executing the target query statement, to perform query processing in each of the plurality of data partitions.

