A query method, comprising: receiving N query requests, wherein N is a positive integer greater than 1; determining N execution plans according to the N query requests, wherein the N execution plans correspond one-to-one to the N query requests, and each of the N execution plans comprises multiple sub-plans; determining at least two same first sub-plans (401, 402), wherein the at least two same first sub-plans belong to different execution plans out of the N execution plans, or the at least two same first sub-plans belong to the same execution plans out of the N execution plans; generating a first sub-query result corresponding to any one of the at least two same first sub-plans, so that the same first sub-query result is used for all the at least two same first sub-plans; after generating the first sub-query result, allocating a same address in a data cache to all the at least two same first sub-plans, wherein the data cache is used to store the first sub-query result, or setting a hyperlink in each of the at least two same first sub-plans, wherein the hyperlink is used to indicate all same first sub-plans; determining at least two mutually different second sub-plans, wherein the at least two mutually different second sub-plans belong to different execution plans out of the N execution plans, and/or the at least two mutually different second sub-plans belong to the same execution plans out of the N execution plans; generating second sub-query results separately corresponding to the at least two mutually different second sub-plans; and generating, based on the first sub-query result and the second sub-query results, a query result corresponding to each of the N query requests, using the address in the data cache allocated to all the at least two same first sub-plans to use the first sub-query results for all the same first sub-plans, or using the hyperlink in each of the at least two same first sub-plans to determine all same first sub-plans. receiving N query requests, wherein N is a positive integer greater than 1; determining N execution plans according to the N query requests, wherein the N execution plans correspond one-to-one to the N query requests, and each of the N execution plans comprises multiple sub-plans; determining at least two same first sub-plans (401, 402), wherein the at least two same first sub-plans belong to different execution plans out of the N execution plans, or the at least two same first sub-plans belong to the same execution plans out of the N execution plans; generating a first sub-query result corresponding to any one of the at least two same first sub-plans, so that the same first sub-query result is used for all the at least two same first sub-plans; after generating the first sub-query result, allocating a same address in a data cache to all the at least two same first sub-plans, wherein the data cache is used to store the first sub-query result, or setting a hyperlink in each of the at least two same first sub-plans, wherein the hyperlink is used to indicate all same first sub-plans; determining at least two mutually different second sub-plans, wherein the at least two mutually different second sub-plans belong to different execution plans out of the N execution plans, and/or the at least two mutually different second sub-plans belong to the same execution plans out of the N execution plans; generating second sub-query results separately corresponding to the at least two mutually different second sub-plans; and generating, based on the first sub-query result and the second sub-query results, a query result corresponding to each of the N query requests, using the address in the data cache allocated to all the at least two same first sub-plans to use the first sub-query results for all the same first sub-plans, or using the hyperlink in each of the at least two same first sub-plans to determine all same first sub-plans.