A multi-table query method and device

By using a multi-table query method, the data sets of the tables are obtained and merged, avoiding the need to add indexes. This solves the SQL query performance problem, improves query efficiency, reduces resource consumption, and enhances the user experience.

CN115145921BActive Publication Date: 2026-07-21BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210771485.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2026-07-21
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

Existing technologies that optimize SQL query performance by adding indexes result in decreased performance for adding, deleting, and modifying data tables, as well as excessive memory consumption, especially in scenarios with intensive add, delete, and modify operations.

Method used

A multi-table query method is used to obtain the page number and the number of data rows per page. The total number of data that meet the conditions is retrieved from multiple data tables, and the data sets are arranged and merged in chronological order. The query results are then extracted to avoid full table scans and index additions. The query scan process is handled by splitting the data using the median number.

Benefits of technology

It improves query efficiency, reduces CPU usage and memory consumption, resolves process blocking and denial-of-service issues caused by slow queries, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145921B_ABST
    Figure CN115145921B_ABST
Patent Text Reader

Abstract

The application provides a multi-table query method and device, obtains a page number P of a page needing to be displayed and a maximum data number Z that can be displayed per page, queries a total number of data meeting a condition from a plurality of data tables, the process is fast in query speed, then a first data set composed of the first P×Z data of each data table is obtained, full table scanning of all data tables is avoided every time a page is skipped, resource consumption is saved, and query efficiency is improved. Then, the first data sets of all data tables are merged and sorted to obtain a second data set, the number of sorting is small, and sorting cost is reduced. Finally, Z data is intercepted from the second data set, the number of data sets for interception is also reduced, and interception efficiency is higher. Therefore, the method uses conditional query, avoids adding indexes that greatly increase the performance of data table addition, deletion and modification and consume a large amount of memory for storing the indexes, and greatly improves query efficiency.
Need to check novelty before this filing date? Find Prior Art

Citation Information

Patent Citations

  • Method and device for inquiring data

    CN103678408A