The invention relates to the technical field of
database query and distributed systems, and discloses a performance optimization method and
system for cross-data-source
paging query, and the method comprises the steps: receiving a query request, and retrieving a historical deviation calibration factor; sending a statistical probe to the heterogeneous
data source, aggregating the statistical probe into a
global distribution estimation function, and calculating a physical value domain
anchor point; constructing a differential locking window, and distributing a prefix counting instruction and a window
data acquisition instruction in parallel; calculating a global reference displacement according to a returned counting result, merging and sorting window records, and intercepting a target
result set; and calculating the error between the real
ranking and the estimated
ranking of the physical anchor points, and updating the historical deviation calibration factor according to the error. According to the method, logic offset is mapped into physical anchor points, index counting and local
slicing are used for replacing linear scanning, and a deviation feedback self-learning mechanism is combined, so that IO overhead of cross-source deep
paging query is remarkably reduced, and
continuous optimization of query performance and positioning precision is realized.