The invention discloses a relational multi-table connection optimization method and
system. The relational multi-table connection
optimization system comprises a multi-table connection query module, an adjacent query operator generation module and a multi-table connection optimization module, the multi-table connection query module detects whether an edge table exists in query based on a pre-constructed inter-table graph structure, and if the edge table exists, whether
graph query can be constructed or not is judged according to an entity table ID associated with the edge table; the adjacency query operator generation module dynamically generates an adjacency query operator for a table conforming to a
graph query structure, an Expand operator directly locates cross-table associated data through a preset adjacency index,
linearization acceleration of a multi-table connection path is achieved, and meanwhile an optimizer generates the execution cost of the Expand operator; the multi-table connection optimization module executes a dynamic
pruning strategy, selectively evaluates whether to continue to explore an
execution plan of a Join operator according to the known cost of the Expand operator, an optimizer synchronously injects the cost of the Expand operator and the Join operator into a cost model, high-cost branches are quickly eliminated through a
hybrid cost evaluation framework, and the optimal cost is obtained. And finally selecting the
execution plan with the minimum global cost as a detection result. According to the method, the optimization
delay problem in a large-scale table connection scene is remarkably relieved, the
system resource consumption is reduced, and meanwhile, the redundant data scanning amount is reduced through an adjacent index jump mechanism.