Patent attributes
A query method and a query device, where the method includes determining N execution plans respectively corresponding to N query requests according to the received N query requests, determining at least two same first sub-plans, generating a first sub-query result corresponding to any one of the at least two same first sub-plans, and in a process of generating, according to the N query requests, a query result corresponding to each of the N query requests, the same first sub-query result corresponding to any one of the first sub-plans is used for all the same first sub-plans. Hence, a large amount of repeated calculation can be reduced, database system resources are reduced, and query efficiency and a throughput of a database system in a large-scale concurrent query application scenario are improved.